昨天给公司配置了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 rocdk890@gmail.com
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 rocdk890@gmail.com
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

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

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

    今天本来是想要在自己本地搭建一个wamp环境用来做一些代码的测试和框架的学习. 鉴于目前工作的时候用到了php5.5,所以就用了wamp-server V2.5版本,安装完成之后配置虚拟主机一直出现4 ...

  2. 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: cli ...

  3. Apache2.4:AH01630 client denied by server configuration

    问题说明:Apache服务总共有4个,是为了防止单点故障和负载均衡,负载均衡控制由局方的F5提供. 访问的内容在NAS存储上,现象是直接访问每个apache的服务内容都是没有问题,但是从负载地址过来的 ...

  4. 403 Forbidden client denied by server configuration[apache2, linux]

    在LAMP的配置过程中, 由于APACHE的版本问题, 即使是APACHE2和APACHE2.2也有很大的不同. 一般都有同一个环境配置多个虚拟网站的情况, 如果你在配置过程中遇到APACHE的不同版 ...

  5. client denied by server configuration

    http://blog.csdn.net/fdipzone/article/details/40512229

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

    出错原因:配置文件限制非本机访问 对策:修改httpd.conf,选择合适的模式,一般局域网环境的话,可以完全放开,使用 <Directory "..../wamp/www" ...

  7. Couldn'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 ...

  8. 解决mount.nfs: access denied by server while mounting错误

    环境:oraclelinux6.7 以前在centos服务器上安装nfs.挂载NFS都没出现问题,今天在oraclelinux上安装后,在客户端mount的时候报mount.nfs: access d ...

  9. 解决mount.nfs: access denied by server while mounting

    在linux下进行挂载时突然出现: mount.nfs: access denied by server while mounting  第一感觉是读取文件权限不够,准备去更改一下挂载点的权限,但又考 ...

随机推荐

  1. 详解C#委托,事件与回调函数

    .Net编程中最经常用的元素,事件必然是其中之一.无论在ASP.NET还是WINFrom开发中,窗体加载(Load),绘制(Paint),初始化(Init)等等.“protected void Pag ...

  2. IP地址匹配

    问题描述: 在路由器中,一般来说转发模块采用最大前缀匹配原则进行目的端口查找,具体如下: IP地址和子网地址匹配: IP地址和子网地址所带掩码做AND运算后,得到的值与子网地址相同,则该IP地址与该子 ...

  3. iOS - UIScrollView

    前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UIScrollView : UIView <NSCoding> @available(iOS 2.0, ...

  4. [转载] 一共81个,开源大数据处理工具汇总(下),包括日志收集系统/集群管理/RPC等

    原文: http://www.36dsj.com/archives/25042 接上一部分:一共81个,开源大数据处理工具汇总(上),第二部分主要收集整理的内容主要有日志收集系统.消息系统.分布式服务 ...

  5. 前端代码新写法——Zen Coding

    是不是还在为html繁琐的标签写法而苦恼? 是不是还在枯燥的写尖括号? Zen Coding的到来将让前端编码不在繁琐.不再拘泥html的尖括号和一堆一堆的标签. 先看看ZenCoding的效果图. ...

  6. mysql 检查字符串是否包含子串

    1.使用substring_index(src,target,index) 从src的开头查找第index个target.返回的substring为从src的开头到第num个target这段字符串.比 ...

  7. 线程高级应用-心得6-java5线程并发库中同步工具类(synchronizers),新知识大用途

    1.新知识普及 2. Semaphore工具类的使用案例 package com.java5.thread.newSkill; import java.util.concurrent.Executor ...

  8. Android 随想录之 Android 系统架构

    应用层(Application) Android 的应用层由运行在 Android 设备上的所有应用程序共同构成(系统预装程序以及第三方应用程序). 系统预装应用程序包含拨号软件.短信.联系人.邮件客 ...

  9. 简析 addToBackStack使用和Fragment执行流程

    在使用Fragment的时候我们一般会这样写: FragmentTransaction transaction = getSupportFragmentManager().beginTransacti ...

  10. spring 配置触发器

    原转发的博文 http://blog.csdn.net/liaq325/article/details/8269439 在Spring中配置Quartz 前面介绍过了Timer在Spring中的实现, ...