Created
July 26, 2015 00:53
-
-
Save matsuu/927415fa65006082e6b8 to your computer and use it in GitHub Desktop.
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
map $time_iso8601 $upstream { | |
default "app-b.example.org"; | |
"~T(0|1[01])" "app-a.example.org"; | |
} | |
server { | |
server_name app.example.org; | |
location / { | |
proxy_pass http://127.0.0.1; | |
proxy_set_header Host $upstream; | |
} | |
} | |
upstream app-a { | |
server app-a.example.net; | |
} | |
server { | |
server_name app-a.example.org; | |
access_log /var/log/nginx/app-a.access.log; | |
location / { | |
proxy_pass http://app-a; | |
} | |
} | |
upstream app-b { | |
server app-b.example.net; | |
} | |
server { | |
server_name app-b.example.org | |
access_log /var/log/nginx/app-b.access.log; | |
location / { | |
proxy_pass http://app-b; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment