安装完毕默认没开启虚拟主机。我们来开启~
首先打开D:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
取消
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
include 前的#
变成:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
然后在D:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf
最后添加虚拟主机配置
ServerAdmin xxx@xxx.xxx
DocumentRoot "d:/wamp/www/www_tp_test"
ServerName xxx.xxx.xxx
ServerAdmin xxx@xxxx.xxx
DocumentRoot "d:/wamp/www"
ServerName localhost