Created
May 4, 2020 03:05
-
-
Save wzhliang/4bf9c538ca80e75144ba1f43d8a843db to your computer and use it in GitHub Desktop.
nginx fallback example
This file contains 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
server { | |
location / { | |
proxy_pass http://new_server; | |
error_page 404 500 502 503 504 = @fallback; | |
} | |
location @fallback { | |
proxy_pass http://old_server; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment