访问被禁止! apache上的错误403


2

我正在尝试在openSUSE 12.2上配置apache服务器。我这样做是在手册中显示的 http://en.opensuse.org/SDB:Linux_Apache_MySQL_PHP 它工作正常。当我尝试访问localhost / ~myuser / website / html / index.html时,我收到此消息:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server. 

If you think this is a server error, please contact the webmaster.

Error 403

任何想法如何解决这一问题 ?


Apache需要能够访问它所服务的文件。这是在root中进行设置时常犯的错误。
Mikhail

Answers:


1

将文件和文件夹的所有者更改为Apache的所有者。它应该得到解决。 命令将如下:

sudo chown apache-user:apache-group ~myuser/website/html/ -R

同时将文件夹的权限更改为755

sudo chmod 755 ~myuser/website/html/ -R

以下是Mediawiki手册的参考资料 mediawiki.org/wiki/...
escalator
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.