apache AH01630: client denied by server configuration错误解决方法
php
出现这个错误的缘由是,apache2.4 与 apache2.2 的虚拟主机配置写法不一样致使。html
apache2.2的写法:apache
<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错误。
解决方法,apache2.4中ide
Order deny,allow Allow from all Allow from host ip
修改成:ui
Require all granted Require host ip
修改后的配置以下:spa
<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>
apache-2.4.x把NameVirtualHost给取消,如今配置虚拟主机不须要再配置NameVirtualHost了.
删除了 Order deny,allow 和 Order allow,deny
把 Deny from all 替换成了 Require all denied
把Allow from all 替换成了 Require all granted
而后还把 Allow from 192.168.10.21 这样的语句给替换成了 Require host 192.168.10.21code