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

昨天给公司配置了apache-2.4.9的版本,今天他们要求把虚拟主机配置起好放网站程序,在修改apache-2.4.9的配置文件中,我发现了2.4.x跟以前的2.2.x里面的很多配置都不一样了,比如配置这个虚拟主机都有一些不同,按照以前的配置方法,会报下面的错误:
AH01630: client denied by server configuration: /usr/local/apache/htdocs/recx/

先给大家看看我按照apache-2.2.x配置虚拟机的内容:
NameVirtualHost 192.168.10.81:80

<VirtualHost 192.168.10.81:80>
ServerAdmin [email protected]
directoryIndex  index.html index.php index.htm index.shtml login.php
ServerName 192.168.10.81
DocumentRoot /var/www/vhosts/wwwroot
<Directory "/var/www/vhosts/wwwroot">
    Options -Indexes

AllowOverride All

Order allow,deny
    Allow from all

</Directory>
</VirtualHost>

然后下面是apache-2.4.x配置虚拟机的内容:
<VirtualHost 192.168.10.81:80>
ServerAdmin [email protected]
directoryIndex  index.html index.php index.htm index.shtml login.php
ServerName 192.168.10.81
DocumentRoot /var/www/vhosts/wwwroot
<Directory "/var/www/vhosts/wwwroot">
    Options -Indexes

AllowOverride All

Require all granted
</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

时间: 2024-07-29 05:04:24

解决apache AH01630: client denied by server configuration错误的相关文章

解决Apache虚拟主机报错问题apache AH01630: client denied by server configuration错误解决方法

今天同事咨询通过Apache搭建创建虚拟主机,搭建好发现一直报错,提示 "apache AH01630: client denied by server configuration",在网上搜索了一下, 发现这个错误的原因是,apache2.4 与 apache2.2 的虚拟主机配置写法不同导致. apache2.2的写法: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 <VirtualHost *:80> ServerName f

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

今天本来是想要在自己本地搭建一个wamp环境用来做一些代码的测试和框架的学习. 鉴于目前工作的时候用到了php5.5,所以就用了wamp-server V2.5版本,安装完成之后配置虚拟主机一直出现403,各种重启N次卸载重装,最后才好到问题的所在,故记录下来,希望其他同学有这样的问题的时候可以快速的解决~~ apache 虚拟主机配置: apache AH01630: client denied by server configuration错误解决方法 出现这个错误的原因是,apache2.

Apache/2.4.9启动错误:AH01630: client denied by server configuration

在升级Yii框架1.11->2.0beta时,PHP升级到5.5.顺带升级Apache2.2.x到2.4.9. 把原有vhost配置移植过来,出现Apache启动错误: AH01630: client denied by server configuration 原因是Apache2.4的部分指令和Apache2.2有所不兼容, 具体升级说明文档见: http://httpd.apache.org/docs/2.4/upgrading.html 具体而言,对于上述错误.做例如以下改动: 把All

wamp本地可以访问,远程无法访问,报错:client denied by server configuration

出错原因:配置文件限制非本机访问 对策:修改httpd.conf,选择合适的模式,一般局域网环境的话,可以完全放开,使用 <Directory "..../wamp/www"> Options -Indexes FollowSymLinks AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory>

Couldn&#39;t open file on client side, trying server side 错误解决

09-09 09:43:21.651: D/MediaPlayer(3340): Couldn't open file on client side, trying server side09-09 09:43:21.661: E/MediaPlayer(3340): attachNewPlayer called in state 128 使用MediaPlayer播放时第二次播放就遇到这个问题,看了下文档最简单的解决办法就是在每次调用播放之前,先reset一下player,就ok了 Could

Apache - AH01630

1.1.1  现象 安装完毕AWSTATS后,运行URL,出现如下错误提示: You don't have permission to access /awstats/awstats.pl on this server. Apache的error.log中错误信息如下: [Wed Mar 26 17:17:37.911338 2014] [authz_core:error] [pid 10748:tid 980] [client ::1:55910] AH01630: client denied

ubuntu eclipse 建立server 提示coud not load the tomcat server configuration at /opt/apache ...的解决方法

ubuntu eclipse 建立server 提示coud not load the tomcat server configuration at /opt/apache ...的解决方法 & 及new server 时tomcat 无法finish (灰掉不可用)的解决方法. 运行命令 chmod -R 777 /opt/apache-tomcat-*

如何解决apache启动时错误:Could not reliably determine the server&#39;s fully qualified domain name

启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name [[email protected] httpd-2.2.4]# /usr/local/apache/bin/apachectl start httpd: Could not reliably determine the server's fully qualified domain name, using 127.0

解决apache启动错误httpd: Could not reliably determine the server&#39;s fully qualified domain name

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this messagehttpd (pid 1068) already running 编辑httpd.conf文件,搜索"#ServerName",添