關於PHP wamp 配置虛擬路徑的簡短描述

本機設置兩個虛擬路徑分別爲  www.test.com    www.mydome.comwindows

首先要配置下Apache配置文件 httpd-vhosts.confdom

 

# Virtual Hosts
#ide

<VirtualHost *:80>
ServerName www.test.com
ServerAlias www.test.com
DocumentRoot H:/wamp/www/test
<Directory "H:/wamp/www/test/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>ui


<VirtualHost *:80>
ServerName www.mydome.com
ServerAlias www.mydome.com
DocumentRoot H:/wamp/www/mydome
<Directory "H:/wamp/www/mydome/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#server

其次設置C:->windows->system32->drivers->etc->hosts文件it

# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.2 www.test.com
127.0.0.3 www.mydome.com
io

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhosttest

相關文章
相關標籤/搜索