Correct proxy path in nginx.conf

前端 未结 3 1260
自闭症患者
自闭症患者 2020-12-05 14:10

we have two servers, A and B. Server A is accessed worldwide. He has nginx installed. That\'s what I have in conf:

location /test {
  proxy_pass http://local         


        
3条回答
  •  甜味超标
    2020-12-05 14:29

    try rewrite

    location /test {
        rewrite ^ $scheme://$host/;
        proxy_pass http://localserver.com;
    }
    

    some helpful links...

    http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite

    http://wiki.nginx.org/Pitfalls

提交回复
热议问题