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>