【问题标题】:Apache: 403 Forbidden when activate virtual hostApache:激活虚拟主机时禁止 403
【发布时间】:2015-12-30 12:51:27
【问题描述】:

我对 apache 和 CentOS 有一个荒谬的问题,网络服务器在默认模式下工作,当转到 http://myip 时,我可以正确查看 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 拥有所有者和组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 将工作并查看测试页面

【问题讨论】:

    标签: apache virtualhost


    【解决方案1】:

    我已经解决了更改路径,而不是 /home/foo/html 我把 /var/www/foo 和工作

    【讨论】:

      猜你喜欢
      • 2015-08-26
      • 2013-07-12
      • 2015-08-13
      • 2019-10-01
      • 2018-01-03
      • 1970-01-01
      • 2015-09-16
      • 2011-10-16
      • 2015-09-16
      相关资源
      最近更新 更多