Last active
August 29, 2015 14:06
-
-
Save tliff/aa7df56102b1a3996288 to your computer and use it in GitHub Desktop.
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
Data: | |
etcdctl mkdir /vhosts | |
etcdctl mkdir /vhosts/foo | |
etcdctl mkdir /vhosts/foo/backends | |
etcdctl mkdir /vhosts/foo/hostnames | |
etcdctl set /vhosts/foo/backends/mybackend "192.168.0.1:8001" | |
etcdctl set /vhosts/foo/backends/myotherbackend "192.168.1.1:8001" | |
etcdctl set /vhosts/foo/hostnames/example "example.com" | |
Target: | |
upstream foo { | |
server 192.168.0.1:8001; | |
server 192.168.1.1:8001; | |
} | |
server { | |
hostname example.com; | |
location / { | |
proxy_pass http://foo; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment