Answers for "rewrite and proxy_pass nginx"

2

nginx rewrite proxy_pass

location  /foo {
  rewrite /foo/(.*) /$1  break;
  proxy_pass         http://localhost:3200;
  proxy_redirect     off;
  proxy_set_header   Host $host;
}
Posted by: Guest on August-20-2021
1

nginx rewrite proxy_pass

location /foo {
    rewrite ^/foo(/.*)$ /some/path$1 break;
    proxy_pass http://external-server-IP:8080;
}
Posted by: Guest on January-14-2022

Browse Popular Code Answers by Language