Last active
April 19, 2018 12:55
-
-
Save caquino/5a57bddc1dba8cb0ab8411dd680b61af 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
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 _; | |
set $mmethod "$http_x_replication_source$request_method"; | |
if ( $mmethod ~ ^(POST|PUT|DELETE|PATCH)$ ) { | |
return 307 http://master.nginx-kv.service.consul$request_uri; | |
} | |
location /replicated { | |
api write=on; | |
} | |
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