配置 apache/httpd 服务器时 403 禁止访问

403 Forbidden while configuring apache/httpd server

我已经使用 "yum install httpd" 在我的 rhel6 中安装了 httpd 使用 "service httpd start" 启动服务器后,我尝试使用 wget http://localhost:8080 访问测试页面(这是我在 httpd.conf 中配置的),我得到 403 访问禁止。任何人都可以帮助我为什么会收到此错误?

检查 httpd.conf 中的目录权限:

<Directory "/var/www/html">
    Options +Indexes FollowSymLinks +ExecCGI
    AllowOverride AuthConfig FileInfo
            Order allow,deny
    Allow from all
</Directory>

其中“/var/www/html”是您的文档根目录。