apacheh2.4和php5.5集成环境遇到的问题

装了wampserver64位,里面的php是5.5,apache是2.4

1.配置虚拟主机时碰到问题:apache AH01630: client denied by server configuration

解决方案如下:

apache2.2的写法:

<VirtualHost *:80>
 ServerName fdipzone.demo.com
 DocumentRoot "/home/fdipzone/sites/www"
 DirectoryIndex index.html index.php

 <Directory "/home/fdipzone/sites/www">
  Options -Indexes +FollowSymlinks
  AllowOverride All
  Order deny,allow
  Allow from all
 </Directory>

</VirtualHost>

如果在2.4中使用以上写法就会有apache AH01630: client denied by server configuration错误。

Order deny,allow
Allow from all
Allow from host ip

修改为

Require all granted
Require host ip

修改后的配置如下:

<VirtualHost *:80>
 ServerName fdipzone.demo.com
 DocumentRoot "/home/fdipzone/sites/www"
 DirectoryIndex index.html index.php

 <Directory "/home/fdipzone/sites/www">
  Options -Indexes +FollowSymlinks
  AllowOverride All
  Require all granted
 </Directory>

</VirtualHost>

2.路由伪静态的问题:500错误

.htaccess: Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration

.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

除了打开rewrite模块以外,还要开启mod_filter.so和mod_headers.so模块才行

解决方法,apache2.4中

原文地址:https://www.cnblogs.com/xingmeng/p/5016101.html