wampserver是我在学习thinkphp的时候用的一款简单的web服务器php
安装完毕默认没开启虚拟主机。咱们来开启~web
首先打开D:\wamp\bin\apache\apache2.2.22\conf\httpd.confthinkphp
取消apache
# Virtual hosts服务器
#Include conf/extra/httpd-vhosts.confide
include 前的#学习
变成:server
# Virtual hostsweb服务器
Include conf/extra/httpd-vhosts.confit
而后在D:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf
最后添加虚拟主机配置
<VirtualHost *:80>
ServerAdmin xxx@xxx.xxx
DocumentRoot "d:/wamp/www/www_tp_test"
ServerName xxx.xxx.xxx
</VirtualHost>
<VirtualHost *:80>
ServerAdmin xxx@xxxx.xxx
DocumentRoot "d:/wamp/www"
ServerName localhost
</VirtualHost>