nginx 13.0 版本以上的反向代理配置

server {
    listen                          8085;
    server_name                     127.0.0.1; 
    charset                         utf-8;
    root                            html/dist;
    location / {
        try_files                       $uri $uri/ /index.html;
        index                            index.html;
    }
    location /api {
        rewrite ^/api/(.*)$ /$1 break; 
        proxy_pass                     https://life.kingflying.cn:8445;
        proxy_buffers                  32 32k;
        proxy_buffer_size             128k;
        proxy_busy_buffers_size      128k;
    }
}
posted @ 2020-07-29 13:36  霏霏雪无声  阅读(167)  评论(0编辑  收藏  举报