nginx怎么正确部署前端项目_技术学院_宜昌市隼壹珍商贸有限公司

您好,欢迎访问宜昌市隼壹珍商贸有限公司

400 890 5375
当前位置: 主页 > 新闻动态 > 技术学院

nginx怎么正确部署前端项目

发布时间:2020-11-16  |  点击率:

目的:

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教程

全国统一服务电话

400 890 5375

电子邮箱:879577@qq.com

公司地址:宜昌市西陵区黄河路5号三峡明珠10栋1051室

咨询微信

TEL:13680874598