nginx 配置dist 加上跨域配置

阅读 69

2022-04-27

  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)

0 0 举报