首页 > 开发 > Apache > 正文

apache01630报错怎么解决

2020-07-28 15:05:48
字体:
来源:转载
供稿:网友
  Apache搭建创建完虚拟主机之后,搭建完成之后却报错,提示为:“apache AH01630: client denied by server configuration”,这个报错是因为apache2.4与apache2.2的虚拟主机配置写法不同所致,因为apache2.2的写法是:
  [plain] view plain copy 在CODE上查看代码片派生到我的代码片
  <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错误。解决方法如下:
  [plain] view plain copy 在CODE上查看代码片派生到我的代码片
  Order deny,allow
  Allow from all
  Allow from host ip
  修改为
  [plain] view plain copy 在CODE上查看代码片派生到我的代码片
  Require all granted
  Require host ip
  修改后的配置如下:
  [plain] view plain copy 在CODE上查看代码片派生到我的代码片
  <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>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表