1.配置host文件(C:\Windows\System32\drivers\etc文件夹下)添加域名信息
127.0.0.1 localhost
可添加多个
2.配置httpd.conf文件(C:\wamp\bin\apache\apache2.4.9\conf文件夹下)
使Include conf/extra/httpd-vhosts.conf有效;
3.添加端口httpd-vhosts.conf文件(C:\wamp\bin\apache\apache2.4.9\conf\extra文件夹下);
<VirtualHost *:8010>
DocumentRoot "C:/wamp/www/webapp/yangguang/"
ServerName Localhost
</VirtualHost>
可以添加多个
4.监听端口httpd.conf(C:\wamp\bin\apache\apache2.4.9\conf文件夹下)