宝塔618特惠活动,企业版999元/年,宝塔SSL证书买1送1!限时抢购!查看活动
当前位置:论坛首页 > Linux面板 > 求助

client denied by server configuration

发表在 Linux面板2017-11-6 16:02 [复制链接] 3 1898

使用apache2.4环境 创建了站点 能正常访问,但是 errorlog中每次请求都有log
[Mon Nov 06 15:40:09.131191 2017] [:error] [pid 25248] [client 118.190.91.56:55306] client denied by server configuration: /www/wwwroot/xxxxx.com/
[Mon Nov 06 15:40:09.131407 2017] [:error] [pid 27301] [client 118.190.91.56:55308] client denied by server configuration: /www/wwwroot/xxxxx.com/
[Mon Nov 06 15:40:09.131562 2017] [:error] [pid 26286] [client 118.190.91.56:55310] client denied by server configuration: /www/wwwroot/xxxxx.com/
[Mon Nov 06 15:40:09.131716 2017] [:error] [pid 25249] [client 118.190.91.56:55312] client denied by server configuration: /www/wwwroot/xxxxx.com/
[Mon Nov 06 15:40:09.131862 2017] [:error] [pid 25245] [client 118.190.91.56:55314] client denied by server configuration: /www/wwwroot/xxxxx.com/
[Mon Nov 06 15:40:09.132019 2017] [:error] [pid 26284] [client 118.190.91.56:55318] client denied by server configuration: /www/wwwroot/xxxxx.com/


到知道 log文件很大 而且越来越大,有解决办法么?

使用道具 举报 只看该作者 回复
发表于 2017-11-6 16:03:24 | 显示全部楼层
我没有更改过配置文件,用的都是默认配置文件
使用道具 举报 回复 支持 反对
发表于 2017-11-7 15:50:10 | 显示全部楼层
有人帮忙么。。。
使用道具 举报 回复 支持 反对
发表于 2017-11-7 15:54:40 | 显示全部楼层
apache AH01630: client denied by server configuration错误解决方法

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

apache2.2的写法:

<VirtualHost *:80>  
ServerName demo.com  
DocumentRoot "/home/sites/www"  
DirectoryIndex index.html index.php  
  
<Directory "/home/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中

Order deny,allow  
Allow from all  
Allow from host ip  
修改为

Require all granted  
Require host ip  

修改后的配置如下:

<VirtualHost *:80>  
ServerName demo.com  
DocumentRoot "/home/sites/www"  
DirectoryIndex index.html index.php  
  
<Directory "/home/sites/www">  
  Options -Indexes +FollowSymlinks  
  AllowOverride All  
  Require all granted  
</Directory>  
  
</VirtualHost>  



具体而言,对于上述错误,做如下修改:
把Allow from all 替换成 Require all granted
重启Apache即可。
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表