Last active
April 19, 2018 12:56
-
-
Save caquino/10d4c33e66da6520a34abc03fb268fd6 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
resolver consul:8600 valid=2s ipv6=off; | |
resolver_timeout 2s; | |
keyval_zone zone=default:32k state=default.json; | |
keyval $arg_text $text1 zone=default; | |
server { | |
status_zone default; | |
root /usr/share/nginx/html; | |
listen 80 default_server; | |
server_name _; | |
location /replicated { | |
mirror /mirror; | |
api write=on; | |
} | |
location /mirror { | |
internal; | |
proxy_set_header X-Replication-Source master; | |
limit_except GET HEAD { | |
proxy_pass http://slave.nginx-kv.service.consul$request_uri; | |
} | |
} | |
location / { | |
try_files $uri $uri/ index.html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment