1.打开C:/windows/system32/drivers/etc/hosts
添加127.0.0.1 www.yourwebsite.com
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 www.yourwebsite.com
2.打开本地apache配置文件/apache/conf/httpd.conf
找到Include "conf/extra/httpd-vhosts.conf" 集成工具会有这个,若没有跳过这步
<VirtualHost 127.0.0.1:*>
ServerName www.yourwebsite.com
DocumentRoot "/xampp/xampp-portable/htdocs/yourwebsite"
<Directory "/xampp/xampp-portable/htdocs/yourwebsite">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
OVER
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。