我的虛擬主機是:如何使用虛擬主機在Apache上運行多個項目?
# for localhost to work properly
<VirtualHost *:1983>
ServerAdmin [email protected]
DocumentRoot "d:/wamp/www"
ServerName localhost
</VirtualHost>
# - See more at: http://yogeshchaugule.com/blog/2014/how-setup-virtual-hosts-wamp#sthash.zVhOHBlJ.dpuf
# - @: http://www.techrepublic.com/blog/smb-technologist/create-virtual-hosts-in-a-wamp-server/
# - @: http://www.kristengrote.com/blog/articles/how-to-set-up-virtual-hosts-using-wamp (maybe out of usable scope)
# afm : Agile Farm Manager
#<VirtualHost *:1983>
# DocumentRoot "D:/projects/afm/Code"
# ServerName dafm.dev
# <Directory "D:/projects/afm/Code">
# Order allow,deny
# Allow from all
# AllowOverride All
# </Directory>
#</VirtualHost>
# mrs : Meeting Request System
<VirtualHost mrs.dev:1983>
DocumentRoot "D:/wamp/www/mrs_site/mrs"
ServerName mrs.dev
ServerAlias mrs.dev
<Directory "D:/wamp/www/mrs_site/mrs">
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
# dtk : Kit Designer
<VirtualHost dtk.dev:1983>
DocumentRoot "D:/wamp/www/designertoolkit/"
ServerName dtk.dev
ServerAlias dtk.dev
<Directory "D:/wamp/www/designertoolkit/">
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
我的Windows的hosts文件中有如下映射
#VIRTUAL DOMAINS
127.0.0.1 dafm.dev
127.0.0.1 mrs.dev
127.0.0.1 dtk.dev
我配置的端口是:1983年,所以我訪問WAMP,如:http://localhost:1983/
或http://mrs.dev:1983/
去到我目前的項目。但我的其他項目不再可用。
就像我去的時候dtk.dev:1983/
對於每一個有效的請求來打開服務器,都會轉到同一個項目http://mrs.dev:1983/
。
我需要在WAMP同時運行多個項目。虛擬主機有什麼問題?
請幫忙
我也已經根據這些鏈接爲wamp啓用了'vhost_alias_module': - 查看更多:http://yogeshchaugule.com/blog/2014/how-setup-virtual-hosts-wamp#sthash.zVhOHBlJ。 dpuf # - @:http://www.techrepublic.com/blog/smb-technologist/create-virtual-hosts-in-a-wamp-server/ # - @:http://www.kristengrote.com /博客/文章/如何對建立虛擬的主機 - 使用 - WAMP(可能超出使用範圍的) – 2014-12-02 08:29:24