标签:
一:
Apache\conf\extra\httpd-vhost.conf 虚拟目录配置文件
添加两个站点
<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "C:/www/w1"
ServerName w1.com
# ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error.log"
# CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "C:/www/w2"
ServerName w2.com
# ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error.log"
# CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
二:
修改Apache\conf\httpd.conf,包含httpd扩展
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
三:
修改http.conf,允许其它ip访问
四:
windows下修改
C:\WINDOWS\system32\drivers\etc\hosts
增加
linux下
vi /etc/hosts
标签:
原文地址:http://www.cnblogs.com/lly-001/p/5492153.html