×
新网 > 虚机资讯 > 正文

apache AH01630: client denied by server configura

  • 作者:未知
  • 来源:
  • 2018-05-15 16:01:15

apache AH01630: client denied by server configuration错误解决方法 出现这个错误的原因是,apache2.4 与 apache2.2 的虚拟主机配置写法不同导致。 apache2.2的写法:  ServerName fdipzone.demo.com  DocumentRoot \"/home/fdipz

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

002UASMrzy7605pjKJv15&690.jpg

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

apache2.2的写法:

<VirtualHost*:80> ServerNamefdipzone.demo.com DocumentRoot"/home/fdipzone/sites/www" DirectoryIndexindex.htmlindex.php <Directory"/home/fdipzone/sites/www"> Options-Indexes+FollowSymlinks AllowOverrideAll Orderdeny,allow Allowfromall </Directory> </VirtualHost>

如果在2.4中使用以上写法就会有apache AH01630: client denied by server configuration错误。
解决方法,apache2.4中

Orderdeny,allow Allowfromall Allowfromhostip

修改为:

Requireallgranted Requirehostip

修改后的配置如下:

<VirtualHost*:80> ServerNamefdipzone.demo.com DocumentRoot"/home/fdipzone/sites/www" DirectoryIndexindex.htmlindex.php <Directory"/home/fdipzone/sites/www"> Options-Indexes+FollowSymlinks AllowOverrideAll Requireallgranted </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.21

  • 相关专题

免责声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,也不承认相关法律责任。如果您发现本社区中有涉嫌抄袭的内容,请发送邮件至:operations@xinnet.com进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

免费咨询获取折扣

Loading