当前位置:web 服务器 > Apache >>

apache配置虚拟主机方法

如果你安装的是 wamps教程erver 集成的   那你就进入wampbinapacheapache2.2.11confextrahttpd-vhosts.conf 配置文件

进行如下配置: 意思是配置3个虚拟主机 ,分别是

1  website.localhost:8080  c:usersn.zhangdocumentswebsitedhr3

2  tools.localhost:8080    c:usersn.zhangdocumentstools

3  test.localhost:8080    c:testphp教程public

//////////////////////////////

<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>

 

<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>

 

<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

补充:Php教程,apache
Apache
IIS
Nginx
Tomcat
如果你遇到web 服务器难题:
访问www.zzzyk.com 试试
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,