前几天新装了个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 All
Order deny,allow
Allow from all
改成下面的,就好了
AllowOverride All
Require all granted