当我尝试访问此WordPress网站时,为什么会出现此403 Forbidden错误?为什么它无法读取.htaccess文件?

时间:2015-02-09 11:08:56

标签: php wordpress apache .htaccess http-status-code-403

尝试打开 WordPress 网站时出现问题:http://www.angeliniappalti.it/

正如您所看到的那样,尝试打开它,我会收到此 403错误消息,此消息:

Forbidden

You don't have permission to access /wp-admin on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2 Server at www.angeliniappalti.it Port 80

在线阅读我发现这是一个众所周知的问题,但我无法找到解决问题的方法。

因此,查看Apache错误日志我可以看到以下错误消息:

[Mon Feb 09 01:27:18 2015] [crit] [client 157.55.39.155] (13)Permission denied: /home/ang12457/domains/angeliniappalti.it/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon Feb 09 01:27:18 2015] [crit] [client 157.55.39.155] (13)Permission denied: /home/ang12457/domains/angeliniappalti.it/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

所以它似乎无法读取 .htaccess 文件,但它的权限被设置为 777 所以理论上这个文件应该是可读的。

这是我的 .htacess 文件的内容:

AuthGroupFile /dev/null
AuthUserFile /home/ang12457/domains/angeliniappalti.it/.htpasswd/public_html/.htpasswd
AuthName "area riservata"

.htaccess 文件包含在 public_html 目录(也包含WordPress目录)中,并且 700 作为权限。< / p>

可能是什么问题?我错过了什么?我该如何尝试解决这个问题?

TNX

1 个答案:

答案 0 :(得分:1)

我自己解决了,我只是将 public_html 目录的权限从 700 更改为 750 ,并且可以正常工作: - )