Last active
August 29, 2015 14:25
-
-
Save matsuu/830d8211c168e921762b to your computer and use it in GitHub Desktop.
時間帯によってupstreamを変える
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
map $time_iso8601 $upstream { | |
default "app-b.example.net"; | |
"~T(0|1[01])" "app-a.example.net"; | |
} | |
server { | |
listen 80; | |
server_name _; | |
location / { | |
proxy_pass http://$upstream; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
おー、試してみます。ありがとうございます。