1、打开httpd.conf
![](https://img-blog.csdnimg.cn/img_convert/8b205b10e58bf8ae79136ef9981def4f.png)
将下面的注释去掉
LoadModule proxy_module modules/mod_proxy.so
2、将前端项目dist.rar解压到xampp\htdocs下,即xampp\htdocs\dist
3、在xampp\htdocs目录下新建一个.htaccess,添加以下文本
RewriteEngine On
RewriteBase /dist
RewriteRule ^/dist/index.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dist/index.html [L]
4、打开xampp\apache\conf\extra\httpd-vhosts.conf
添加配置
##ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:/soft/xampp/htdocs/dist/"
ServerName www.vinc.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
5、打开C:\Windows\System32\drivers\etc\hosts
添加配置127.0.0.1 www.vinc.com
6、重启apache