方法一:
首先打开apache中conf下的http.conf文件打开虚拟主机的注释:如下去掉第二行前面的#即可。
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
再打开conf目录下的extra目录中的httpd-vhosts.conf文件,在文件最后面加上
-
- ServerAdmin webmaster@dummy-host2.localhost
- DocumentRoot "D:/www/"
-
- ServerName www.phpfensi.com
- ErrorLog "logs/dummy-host2.localhost-error.log"
- CustomLog "logs/dummy-host2.localhost-access.log" common
-
配置完成后保存即可
然后打开c:/windows/system32/drivers/etc/hosts,在其中配置你所需要的hosts,例如: 127.0.0.1 www.phpfensi.com 192.168.1.80 www.phpfensi.com
方法二:
直接在http.conf最后面加上:
-
- ServerName www.111cn.net
- DocumentRoot D:/www/
-
- AllowOverride All
- Options All
-
- php教程_value include_path D:/library
- php_value magic_quotes_gpc off
- php_value register_globals off
-
|