内容目录
1.在httpd.conf里修改
NameVirtualHost localhost:80
<VirtualHost localhost:80>
DocumentRoot “D:/wamp/www”
ServerName localhost
ServerAlias localhost
<Directory “D:/wamp/www”>
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
NameVirtualHost client.test.com:80
<VirtualHost client.test.com:80>
DocumentRoot “D:/other”
ServerName client.test.com
ServerAlias www.client.test.com
<Directory “D:/other”>
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
2.修改C:/WINDOWS/system32/drivers/etc/host这个文件,用记事本打开,加上如下内容:
127.0.0.1
3.重启apache