主要是修改 vhosts.conf文件和httpd.conf文件,然后重启。
httpd.conf文件:【注意补充端口】
#Listen 12.34.56.78:80
Listen 8089
Listen 9001
Listen 9002
Listen 9003
Listen 9004
vhosts.conf文件
<VirtualHost _default_:8089>DocumentRoot "D:/phpStudy/WWW"
<Directory "D:/phpStudy/WWW">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:9001>
DocumentRoot "D:\wamp\www"
ServerName wamptest
ServerAlias
<Directory "D:\wamp\www">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:9002>
DocumentRoot "D:\wusuxh"
ServerName wushu
ServerAlias
<Directory "D:\wusuxh">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:9003>
DocumentRoot "D:\web9003"
ServerName w9003
ServerAlias
<Directory "D:\web9003">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>