来源:https://www.jianshu.com/p/4fb84c24c8f6
1、按照链接(https://www.jianshu.com/p/4fb84c24c8f6)安装apacha,配置环境变量,修改配置文件conf\httpd.conf
2、修改httpd.conf
修改端口:Listen 0.0.0.0:8080
修改:ServerName localhost:8080
修改默认目录:Define SRVROOT "D:\Program Files\Apache24"
增加虚拟主机:
DocumentRoot "${SRVROOT}/htdocs"
<Directory "${SRVROOT}/htdocs">
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
Require local
</Directory>
修改环境变量:
2、同步最新代码,本地执行npm run build:dev
3、将本地dist内的文件,拷贝到apacha的htdocs路径中
4、启动apache服务,在bin目录下执行下面两条命令:
httpd.exe -k install -n "Apache24"
net start Apache243