标签:
1.开启apache的mod_rewrite功能
关闭注释
LoadModule rewrite_module modules/mod_rewrite.so
2.引入http-vhosts.conf文件
关闭注释
Include conf/extra/httpd-vhosts.conf
3.添加VIrtualHost配置
修改 conf/extra/httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "D:/wamp/www/test/2"
ServerName haha.com
</VirtualHost>
<Directory "D:/wamp/www/test/2">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
4.修改host文件
添加 127.0.0.1 hah.com
标签:
原文地址:http://www.cnblogs.com/personalnote/p/4619210.html