【发布时间】:2016-08-15 06:16:10
【问题描述】:
我见过很多这样的问题,其中大多数最终都将语法更改为最新的 Apache 版本或弄乱了 .htaccess。但不是我的情况,因为我使用全新的 F23 安装并且从未使用过更早的 Apache 版本。我正在尝试设置一个绑定到我的一个 IP 的简单虚拟主机。这是我放入 /etc/httpd/conf.d/internal.conf 的内容
Listen 10.10.1.177:80
<VirtualHost 10.10.1.177:80>
DocumentRoot "/home/www"
DirectoryIndex index.html
ServerName internal:80
<Directory “/home/www“>
Options All Indexes FollowSymLinks
Options +Indexes
Require all granted
</Directory>
LogLevel debug
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/httpd/internal-error.log
CustomLog /var/log/httpd/internal-access.log combined
</VirtualHost>
当我尝试时:
curl http://10.10.1.17
从该网络中的其他主机,第一个 403 页面出现并被重定向到默认的 fedora-apache 页面。此条目条目进入错误日志:
2016-04-21 22:45:50.610696 AH01626: authorization result of Require all denied: denied
2016-04-21 22:45:50.610724 AH01626: authorization result of <RequireAny>: denied
2016-04-21 22:45:50.610729 AH01630: client denied by server configuration: /home/www/
2016-04-21 22:45:50.610763 AH01626: authorization result of Require all granted: granted
2016-04-21 22:45:50.610771 AH01626: authorization result of <RequireAny>: granted
我只想让这个虚拟服务器为我放入 /home/www 的任何内容提供服务。我错过了什么?
我更改了主 httpd.conf 文件以绑定到我的其他网络接口。 我已经为“deny|denied”语句“greped”了所有 .conf 文件,并且在主配置中发现“/”目录和 .ht 文件只有默认的“Require all denied”。
【问题讨论】:
标签: apache