wampserver绑定域名、添加虚拟主机

 wampserver是我在学习thinkphp的时候用的一款简单的web服务器

安装完毕默认没开启虚拟主机。我们来开启~

首先打开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

最后添加虚拟主机配置

<VirtualHost *:80>

    ServerAdmin [email protected]

    DocumentRoot "d:/wamp/www/www_tp_test"

    ServerName xxx.xxx.xxx

</VirtualHost>

 

<VirtualHost *:80>

    ServerAdmin [email protected]

    DocumentRoot "d:/wamp/www"

    ServerName localhost

</VirtualHost>

 

你可能感兴趣的:(wamp,wampserver,虚拟主机)