apache 2.4-X版本配置虚拟主机
来源:互联网 发布:mysql 自增 编辑:程序博客网 时间:2024/06/05 16:34
升级到apache2.4以上的版本时,其配置和之前的略有不同。
比如 ,配置虚拟主机的过程:
1.httpd.conf 文件开启虚拟主机配置文件加载
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
2.在extra/httpd-vhosts.conf配置文件中配置虚拟主机
#www目录下的虚拟主机
<VirtualHost *:80>
DocumentRoot "D:\wamp\wamp\www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:\Users\Administrator\Desktop\testgit"
ServerName www.testcrm.com
</VirtualHost>
3.此时,如果访问第二个虚拟主机是没有权限的。因为在httpd.conf中已禁用了其它目录的访问权限,此时只需在httpd.conf中找到
<Directory />
AllowOverride none
Require all denied #改为granted即可
</Directory>
更多的配置详情:http://httpd.apache.org/docs/
比如 ,配置虚拟主机的过程:
1.httpd.conf 文件开启虚拟主机配置文件加载
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
2.在extra/httpd-vhosts.conf配置文件中配置虚拟主机
#www目录下的虚拟主机
<VirtualHost *:80>
DocumentRoot "D:\wamp\wamp\www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:\Users\Administrator\Desktop\testgit"
ServerName www.testcrm.com
</VirtualHost>
3.此时,如果访问第二个虚拟主机是没有权限的。因为在httpd.conf中已禁用了其它目录的访问权限,此时只需在httpd.conf中找到
<Directory />
AllowOverride none
Require all denied #改为granted即可
</Directory>
更多的配置详情:http://httpd.apache.org/docs/
0 0
- apache 2.4-X版本配置虚拟主机
- Apache 2.4虚拟主机配置
- 不同版本的apache通过httpd-vhosts.conf配置虚拟主机
- Apache 2.2版本配置虚拟目录以及虚拟主机实例
- Apache 2.4.9多站点(虚拟主机)配置
- APACHE虚拟主机配置方法
- Apache虚拟主机的配置
- apache虚拟主机配置
- apache+weblogic虚拟主机配置
- Apache虚拟主机的配置
- apache 虚拟主机配置记录
- Apache 虚拟主机配置笔记
- apache虚拟主机配置
- apache虚拟主机配置
- apache虚拟主机配置小记
- windows apache 虚拟主机配置
- Apache 2.2 虚拟主机配置
- apache配置虚拟主机
- window添加控制面板项目
- webpack打包1
- hdu 1274 展开字符串
- Android 第一行代码(第二版)学习笔记(一)
- 关于Struts2框架的学习(四)
- apache 2.4-X版本配置虚拟主机
- automation
- chorme浏览器无法播放MP4格式的视频解决
- [Err] 1091
- LeetCode:349. Intersection of Two Arrays
- 创建一个目录,进入目录,在目录里创建文件并用ls1。显示出来各需要什么权限
- 本机不安装Oracle客户端,使用PL/SQL Developer连接远程数据库
- SpringMVC——使用RequestDispatcher.include()和HttpServletResponseWrapper动态获取jsp输出内容
- Krypton Factor UVA