Skip to content

Instantly share code, notes, and snippets.

@ushis
Created April 9, 2013 23:55
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 ushis/5350507 to your computer and use it in GitHub Desktop.
Save ushis/5350507 to your computer and use it in GitHub Desktop.
Nginx proxy_pass filtered by HTTP verbs.
# From http://stackoverflow.com/questions/8591600/nginx-proxy-pass-based-on-whether-request-method-is-post-put-or-delete
server {
location / {
# This proxy_pass is used for requests that don't
# match the limit_except
proxy_pass http://127.0.0.1:8080;
# For requests that *aren't* a PUT, POST, or DELETE,
# pass to :9080
limit_except PUT POST DELETE {
proxy_pass http://127.0.0.1:9080;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment