一、在\wamp\bin\apache\Apache2.4.4\conf\extra\httpd-vhosts.conf 修改如下
NameVirtualHost *:80DocumentRoot "E:/website/pxsj" ServerName host7.com ServerAlias 192.168.1.116 NameVirtualHost *:8080Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all DocumentRoot "E:/website/whsj" ServerName host10.com:8080 ServerAlias 192.168.1.116:8080 Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all
二、\wamp\bin\apache\Apache2.4.4\conf\httpd.conf 修改如下:
在该文件中查找“Listen”一词修改
Listen 80Listen 8080# Virtual hosts # Include conf/extra/httpd-vhosts.conf去掉前面的#,这样就开启了httpd-vhosts虚拟主机文件。这时候重启环境
三、C:\Windows\System32\drivers\etc\hosts 修改配置
版权声明:本文为博主原创文章,未经博主允许不得转载。