apache配置虚拟主机方法
发布:smiling 来源: PHP粉丝网 添加日期:2013-11-23 21:12:57 浏览: 评论:0
如果你安装的是 wampserver 集成的,那你就进入
wampbinapacheapache2.2.11confextrahttpd-vhosts.conf 配置文件进行如下配置: 意思是配置3个虚拟主机 ,分别是
1、website.localhost:8080 c:usersn.zhangdocumentswebsitedhr3
- <virtualhost *:8080>
- servername website.localhost
- serveradmin webmaster@test.tools.directhr.net
- documentroot "c:usersn.zhangdocumentswebsitedhr3"
- <directory "c:usersn.zhangdocumentswebsitedhr3">
- options indexes multiviews followsymlinks
- allowoverride all
- order allow,deny
- allow from all
- </directory>
- errorlog "logs/test.tools.directhr.net-error.log"
- customlog "logs/test.tools.directhr.net-access.log" common
- </virtualhost>
2、tools.localhost:8080 c:usersn.zhangdocumentstools
- <virtualhost *:8080>
- servername tools.localhost
- serveradmin webmaster@test.tools.directhr.net
- documentroot "c:usersn.zhangdocumentstools"
- <directory "c:usersn.zhangdocumentstools">
- options indexes multiviews followsymlinks
- allowoverride all
- order allow,deny
- allow from all
- </directory>
- errorlog "logs/test.tools.directhr.net-error.log"
- customlog "logs/test.tools.directhr.net-access.log" common
- </virtualhost>
3、test.localhost:8080 c:testphppublic
- <virtualhost *:8080>
- servername test.localhost
- serveradmin webmaster@test.tools.directhr.net
- documentroot "c:testphppublic"
- <directory "c:testphppublic">
- options indexes multiviews followsymlinks
- allowoverride all
- order allow,deny
- allow from all
- </directory>
- errorlog "logs/test.tools.directhr.net-error.log"
- customlog "logs/test.tools.directhr.net-access.log" common
- </virtualhost>
还有件重要的事情是配置c:windowssystem32driversetchosts
Tags: apache 配置 虚拟主机
相关文章
- ·在apache下限制每个虚拟主机的并发数(2013-11-14)
- ·APACHE禁止图片盗链(2013-11-14)
- ·Apache下的虚拟主机设置(2013-11-14)
- ·Apache中禁止IP段,在httpd.conf中的写法(2013-11-14)
- ·用Apache的rewrite生成伪静态页面(2013-11-14)
- ·HTTP/Apache 错误代码汇总(2013-11-14)
- ·Apache性能优化技巧(2013-11-22)
- ·用Session代替Apache服务器验证(2013-11-22)
- ·Apache中httpd.conf的中文件详解(2013-11-22)
- ·Apache中.Htaccess文件的功能写法(2013-11-22)
- ·如何让apache支持.htaccess并设置404错误页(2013-11-22)
- ·apache 虚拟主机配置[别名配置方法](2013-11-22)
- ·apache 服务器网站不能访问(2013-11-22)
- ·apache教程:.htaccess用法(2013-11-22)
- ·Apache二级域名配置方法(2013-11-22)
- ·apache 封IP基础教程(2013-11-22)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)