PHP study2014 配置多个站点(主要是修改 vhosts.conf文件,然后重启。)
原创
©著作权归作者所有:来自51CTO博客作者xocom的原创作品,请联系作者获取转载授权,否则将追究法律责任
主要是修改 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>