标签:
一、添加服务端口
在文件Apache\conf\httpd.conf中,去掉前面的#号,重启
#LoadModule rewrite_module modules/mod_rewrite.so
#Include conf/extra/httpd-vhosts.conf
二、在文件Apache\conf\extra\httpd-vhosts.conf 文件中,修改里面相应的配置:
NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@d.localhost DocumentRoot "D:/wamp/www/Lee" ServerName www.lee.com ServerAlias www.dummy-host.localhost ErrorLog "logs/dummy-host.localhost-error.log" CustomLog "logs/dummy-host.localhost-access.log" common </VirtualHost> NameVirtualHost *:8001 <VirtualHost *:8001> ServerAdmin webmaster@d.localhost DocumentRoot "D:/wamp/www/LiMei" ServerName www.limei.com ErrorLog "logs/dummy-host2.localhost-error.log" CustomLog "logs/dummy-host2.localhost-access.log" common </VirtualHost>
三、打开C:\WINDOWS\system32\drivers\etc\hosts
127.0.0.1 localhost 127.0.0.1 www.paidad.cn
Apache 虚拟机 vhosts C:\WINDOWS\system32\drivers\etc\hosts
标签:
原文地址:http://www.cnblogs.com/shaoing/p/5454250.html