apache vhost 本地域名访问
NameVirtualHost *:80
DocumentRoot "D:\Program Files\Apache Software Foundation\httpd-2.2-x64\htdocs"
ServerAdmin whoever@site.com
DocumentRoot "D:/city"
ServerNamewww.xxx.com
ServerAlias *.xxx.com
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
1 开启apache mod vhost 将上面的内容复制到 httpd.conf或者打开vhost文件引用,放入vhost文件中
2 在hosts文件中添加127.0.0.1 www.xxx.com
页:
[1]