目的:
nginx部署打包成为dist的前端项目
(学习视频分享:php视频教程)
相关知识:docker 安装与使用
docker pull nginx
docker run --restart=on-failure:20 -itd --name nginx -p 80:80 nginx:latest
SEOnginx如何部署dist?
nginx如何部署vue?
nginx如何部署前端项目?
安装nginx后,配置
该文件放在/etc/nginx/conf.d/xxx.confserver{
listen 80;
server_name xxx.com;
location /{
root /home/web/vueProjects/wxopapp/dist/;
index index.htm index.html;
expires 30d;
}
}nginx -t
nginx -s reload