Created
August 5, 2013 09:35
-
-
Save wojons/6154645 to your computer and use it in GitHub Desktop.
nginx dont retry next upstream on post or put when timeout error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream mash { | |
ip_hash; | |
server 127.0.0.1:8081; | |
server 192.168.0.11:8081; | |
} | |
server { | |
location / { | |
if ($request_method = POST ) { | |
proxy_next_upstream error; | |
} | |
if ($request_method = PUT ) { | |
proxy_next_upstream error; | |
} | |
proxy_pass http://mash/; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good