nginx怎么正确部署前端项目

nginx怎么正确部署前端项目,第1张

nginx怎么正确部署前端项目

目的:

nginx部署打包成为dist的前端项目

(学习视频分享:php视频教程)

相关知识:

docker 安装与使用
docker pull nginx
docker run --restart=on-failure:20 -itd --name nginx -p 80:80 nginx:latest

SEO

nginx如何部署dist?
nginx如何部署vue?
nginx如何部署前端项目?

安装nginx后,配置

该文件放在/etc/nginx/conf.d/xxx.conf

server{
    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

相关推荐:nginx教程

以上就是nginx怎么正确部署前端项目的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/707779.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-24
下一篇 2022-04-24

发表评论

登录后才能评论

评论列表(0条)

保存