apache 2.2 和2.4 配置虚拟域名的区别

来源:互联网 发布:python爬虫书籍推荐 编辑:程序博客网 时间:2024/05/21 12:44

前几天新装了个2.4的apache,按照下面的2.2的配置文件配置。然后就发现启动不了。今天就看了下,发现了问题所在,就写了下。

<VirtualHost *:9000>    ServerAdmin xiaoqiao.com    DocumentRoot "Z:/lamp/apache/Apache24/htdocs/gitRecord/php/cms"    ServerName xiaoqiao.com    <Directory "Z:/lamp/apache/Apache24/htdocs/gitRecord/php/cms">           Options FollowSymLinks includes Indexes        AllowOverride All        Order deny,allow        Allow from all    </Directory>    ErrorLog "logs/dummy-host2.example.com-error.log"    CustomLog "logs/dummy-host2.example.com-access.log" common</VirtualHost>

解决方法,apache2.4中需要将

AllowOverride AllOrder deny,allowAllow from all

改成下面的,就好了

AllowOverride All  Require all granted  
原创粉丝点击