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