分两步实现:
第一步:到apache安装目录下的httpd.conf并打开,在最后加上:
<VirtualHost *:8080>
DocumentRoot "C:websitevisit_info"
ServerName threefond.com
<Directory "C:websitevisit_info">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:website"
ServerName www.threefond.com
<Directory "C:website">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
第二步:找到C:/Windows/System32/drivers/etc下的hosts文件并打开,在最后加上:
127.0.0.1 www.threefond.com
127.0.0.1 threefond.com