一、添加服务端口
在文件Apacheconfhttpd.conf中,去掉前面的#号,重启
#LoadModule rewrite_module modules/mod_rewrite.so
#Include conf/extra/httpd-vhosts.conf
二、在文件Apacheconfextrahttpd-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:WINDOWSsystem32driversetchosts
127.0.0.1 localhost 127.0.0.1 www.paidad.cn