1.官网下载xampp并安装
https://www.apachefriends.org/zh_cn/index.html
2.找到文件conf/extra/httpd-vhosts.conf,增加如下内容
<VirtualHost *:8008>
ServerAdmin blog.com
DocumentRoot "E:/test/blog/public" #项目路径
ServerName blog.com #访问的域名
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
3.配置host文件
127.0.0.1 blog.com
4.访问,blog.com:8008