复制代码 代码如下:
NameVirtualHost *:80
documentRoot "E:/website/pxsj"
ServerName host7.com
ServerAlias 192.168.1.116
Options Indexes FollowSymlinks
AllowOverride None
Order allow,deny
Allow from all
NameVirtualHost *:8080
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
二、wampbinapacheApache2.4.4confhttpd.conf 修改如下:
在该文件中查找“Listen”一词修改
复制代码 代码如下:
Listen 80
Listen 8080
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf去掉前面的#,这样就开启了httpd-vhosts虚拟主机文件。这时候重启环境
三、C:WindowsSystem32driversetchosts 修改配置
复制代码 代码如下:



