apache AH01630: client denied by server configuration错误解决方法

来源:互联网 发布:网络运营总监简历 编辑:程序博客网 时间:2024/06/08 18:41

apache AH01630: client denied by server configuration错误解决方法


出现这个错误的原因是,apache2.4 与 apache2.2 的虚拟主机配置写法不同导致。


apache2.2的写法:

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <VirtualHost *:80>  
  2.  ServerName fdipzone.demo.com  
  3.  DocumentRoot "/home/fdipzone/sites/www"  
  4.  DirectoryIndex index.html index.php  
  5.   
  6.  <Directory "/home/fdipzone/sites/www">  
  7.   Options -Indexes +FollowSymlinks  
  8.   AllowOverride All  
  9.   Order deny,allow  
  10.   Allow from all  
  11.  </Directory>  
  12.   
  13. </VirtualHost>  

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

解决方法,apache2.4中

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
  1. Order deny,allow  
  2. Allow from all  
  3. Allow from host ip  
修改为

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
  1. Require all granted  
  2. Require host ip  

修改后的配置如下:

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <VirtualHost *:80>  
  2.  ServerName fdipzone.demo.com  
  3.  DocumentRoot "/home/fdipzone/sites/www"  
  4.  DirectoryIndex index.html index.php  
  5.   
  6.  <Directory "/home/fdipzone/sites/www">  
  7.   Options -Indexes +FollowSymlinks  
  8.   AllowOverride All  
  9.   Require all granted  
  10.  </Directory>  
  11.   
0 0
原创粉丝点击