Skip to content

Instantly share code, notes, and snippets.

@cgimenes
Created October 31, 2017 03:28
Show Gist options
  • Save cgimenes/7adfeb591f2fa789d3df4d452bc84d8f to your computer and use it in GitHub Desktop.
Save cgimenes/7adfeb591f2fa789d3df4d452bc84d8f to your computer and use it in GitHub Desktop.
simple redirect by uri
location /api {
rewrite ^/api(.*) $1 break;
proxy_pass http://localhost:8084;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment