[英]Apache: 403 Forbidden when activate virtual host
我对apache和CentOS有一个荒谬的问题,当转到http:// myip时,Web服务器在默认模式下工作,我可以正确查看apache测试页。 如果添加`/etc/httpd/conf.d/foo.conf
<VirtualHost *:80>
ServerName foo.local
DocumentRoot "/home/foo/html"
ErrorLog /var/log/httpd/foo.local-error.log
<Directory "/home/foo/html">
Options Includes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
我有403禁止将所有目录配置为apache,我也看不到任何测试页。 目录/home/foo/html
具有owner和group apache
,对目录的权限为775,对文件的权限为664。 我在日志中看到:
AH00035: access to / denied (filesystem path '/home/foo/html') because search permissions are missing on a component of the path
如果我停用此conf文件,则apache可以运行并查看测试页
我已经解决了更改路径的问题,而是将/home/foo/html
放到/var/www/foo
并工作了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.