0
点赞
收藏
分享

微信扫一扫

nginx 配置dist 加上跨域配置

简单聊育儿 2022-04-27 阅读 69
nginx
  server {
        listen       3010;
        server_name  localhost;
        location / {
            root /usr/s_sinux_project/dist;#你的dist目录
            index  index.html index.htm;
            try_files $uri  $uri/ /index.html;
        }

         location /api/ {
                proxy_pass http://127.0.0.1:8888/;
        }
             location /tag/ {
                proxy_pass http://127.0.0.1:11223/;
        }


    }

举报

相关推荐

0 条评论