apache AH01630: client denied by server configuration

今天药忘吃喽~ 2022-08-20 10:16 64阅读 0赞

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

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

apache2.2的写法:

[plain] view plain copy

在CODE上查看代码片 派生到我的代码片

  1. ServerName fdipzone.demo.com
  2. DocumentRoot “/home/fdipzone/sites/www”
  3. DirectoryIndex index.html index.php
  4. Options -Indexes +FollowSymlinks
  5. AllowOverride All
  6. Order deny,allow
  7. Allow from all

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

解决方法,apache2.4中

[plain] view plain copy

在CODE上查看代码片 派生到我的代码片

  1. Order deny,allow
  2. Allow from all
  3. Allow from host ip

修改为

[plain] view plain copy

在CODE上查看代码片 派生到我的代码片

  1. Require all granted
  2. Require host ip

修改后的配置如下:

[plain] view plain copy

在CODE上查看代码片 派生到我的代码片

  1. ServerName fdipzone.demo.com
  2. DocumentRoot “/home/fdipzone/sites/www”
  3. DirectoryIndex index.html index.php
  4. Options -Indexes +FollowSymlinks
  5. AllowOverride All
  6. Require all granted

发表评论

表情:
评论列表 (有 0 条评论,64人围观)

还没有评论,来说两句吧...

相关阅读