Skip to content

Instantly share code, notes, and snippets.

@cocoy
Created September 6, 2012 02:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocoy/3650073 to your computer and use it in GitHub Desktop.
Save cocoy/3650073 to your computer and use it in GitHub Desktop.
location /v1/ {
rewrite /v1/(.+) /$1 permanent;
proxy_set_header Host $host;
proxy_set_header X-Request-URL $scheme://$http_host$request_uri;
proxy_pass http://public-api-backend;
}
location /v1/ {
proxy_set_header Host $host;
proxy_set_header X-Request-URL $scheme://$http_host$request_uri;
proxy_pass http://public-api-backend/;
# ending slash on proxy_pass url
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment