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.監(jiān)聽端口httpd.conf(C:\wamp\bin\apache\apache2.4.9\conf文件夾下)