Wamp环境下配置--Apache虚拟主机
1、首先打开apache的配置文件httpd.conf,并去掉#Include conf/extra/httpd-vhosts.conf前面的#,启用虚拟主机功能 1 # Virtual hosts 2 Include conf/extra/httpd-vhosts.conf 1 Listen 127.0.0.1:80 2 Listen 80 2、先把localhost配置好,将下面信息添加到apache的apache/conf/extra下的配置文件httpd-vhosts.conf后面即可; 1 <VirtualHost *:80> 2 ServerAdmin webmaster@dummy-host2.hleclerc-PC.ingenidev 3 DocumentRoot "D:\wamp\www\tpshop\www.shop.com" 4 DirectoryIndex index.html index.php index.htm 5 ServerName wwww.shop.com 6 <Directory "D:\wamp\www\tpshop\www.shop.com"> 7 AllowOverride All 8 Allow from All 9 </Directory> 10 </VirtualHost> 11 12 <VirtualHost *:80> 13