博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Apache2.4.6 添加虚拟主机
阅读量:6933 次
发布时间:2019-06-27

本文共 753 字,大约阅读时间需要 2 分钟。

apache2.4 与 apache2.2 的虚拟主机配置写法有所不同

apache2.2的写法:

ServerName domain.com DocumentRoot "/home/www" DirectoryIndex index.html index.php
Options -Indexes +FollowSymlinks AllowOverride All Order deny,allow Allow from all

如果在2.4中使用以上写法就会出现apache AH01630: client denied by server configuration异常。

apache2.4中的写法为

ServerName domain.com DocumentRoot "/home/www" DirectoryIndex index.html index.php
Options -Indexes +FollowSymlinks AllowOverride All Require all granted

解决方法,apache2.4中需要将

Order deny,allow  Allow from all  Allow from host ip

改为

Require all granted  Require host ip

 注:yum安装的httpd,在/etc/httpd/conf.d/目录下添加vhosts.conf后重启即可。

转载地址:http://jstjl.baihongyu.com/

你可能感兴趣的文章
设计模式之【适配器--Adapter】
查看>>
iOS开发常用输入校验
查看>>
UML类图及依赖,泛化,关联,聚合,组合,实现
查看>>
13. Spring Boot 拦截器
查看>>
bootstrap Grid布局(网格布局)
查看>>
java实现HeapSort
查看>>
Spring 事务
查看>>
MySQL 中国省市区SQL表数据
查看>>
HTML5取代不了Flash
查看>>
BNU52325-Increasing or Decreasing-数位DP-DFS
查看>>
JDK源码阅读--StringBuffer
查看>>
(45) Manifest文件
查看>>
微信小程序中的bindTap事件(微信小程序开发QQ群:604788754)
查看>>
九度 1149 子串计算
查看>>
消息中间件基础
查看>>
IIS特殊字符设置
查看>>
javascript 函数对象
查看>>
js中作用域链的问题
查看>>
[Silverlight] How to make a simple PivotTable extended from Silverlight DataGrid
查看>>
javaScript 基本包装类型
查看>>