每天每天
越来越爱

vue项目打包后代理nginx设置 nginx配置vue代理


server {
        listen       8700;
        server_name  vagetable;
        location / {
            root   /usr/local/nginx/vagetalbe;
            #index  index.html index.htm;
        try_files $uri $uri/ /index.html;
        }

        location ^~/admin/ {
            charset utf-8;
            proxy_pass http://127.0.0.1:9300/admin/;
        }

        location ^~/upload/ {
            charset utf-8;
            proxy_pass http://127.0.0.1:9200/;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
赞(0) 打赏

评论 抢沙发