nginx部署vue工程简单的配置文件

nginx部署vue工程简单的配置文件

server {
        listen 8081;     #1.你想让你的这个项目跑在哪个端口
        server_name 111.111.111.111;     #2.当前服务器ip(名称)
        location / {
                root   /opt/zhengjiao/dist;     #3.dist文件的位置(我是直接放在home目录下了)
                try_files $uri $uri/ /index.html;     #4.重定向,内部文件的指向(照写)
        }
}
posted @ 2021-10-13 14:22  碎了的冰  阅读(235)  评论(0编辑  收藏  举报