Skip to content

Instantly share code, notes, and snippets.

@matsuu
Last active August 29, 2015 14:25
Show Gist options
  • Save matsuu/830d8211c168e921762b to your computer and use it in GitHub Desktop.
Save matsuu/830d8211c168e921762b to your computer and use it in GitHub Desktop.
時間帯によってupstreamを変える
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;
}
}
@mkouhei
Copy link

mkouhei commented Jul 23, 2015

おー、試してみます。ありがとうございます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment