1、在c:\windows\system32\drivers\etc\hosts文件中增加
127.0.0.1 servername
2、在httpd.conf中增加
<VirtualHost *:80>
ServerName servername
DocumentRoot "e:/wamp/www/serverpath"
<Directory "e:/wamp/www/serverpath">
AllowOverride all
Allow from all
</Directory>
</VirtualHost>
也可在新建的filename.conf文件中写入,并在httpd.conf 中引入该文件
Include "E:/wamp/alias/*"