我正在使用Apache 2.4进行EL7的testing安装。 我将现有的/etc/httpd/conf.d/ssl.conf复制到新系统中,build立了selinux,validation了所有的certpath都是kosher, systemctl httpd start了这个服务。 Apache运行无错误。
问题是我的ssl.conf文件被忽略。 我正在使用默认的Apache页面显示
我尝试将/etc/httpd/conf.d/ssl.conf移动到/etc/httpd/conf.modules.d/ (首先删除现有的00-ssl.conf文件),结果相同。
我在哪里错了?
编辑1错误日志显示这个:
AH01630: client denied by server configuration: /www/virtualhosts/example.com
我的SSLconfiguration有这样的地方:
DocumentRoot /www/virtualhosts/example.com
和
ll /www/virtualhosts/example.com total 4 -rw-r--r--. 1 apache apache 21 Dec 18 14:32 index.php
index.php包含:
<p>Hello World
我不知所措
得到它了。 Apache 2.4具有额外的安全function。 我需要将其添加到/etc/httpd/conf/http.conf并重新启动服务。
<Directory "/www/virtualhosts/example.com"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
我可以haz网站。
另外,我将默认的00-ssl.conf文件移回原位( /etc/httpd/conf.modules.d/ ),并将ssl.conf移回到/etc/httpd/conf.d/ssl.conf 。
重新启动服务,一切都还好。