Last active
April 12, 2018 14:46
-
-
Save caquino/a4692d5abefba4141ad6f5e9fa49ee05 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
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=default:10m max_size=50m; | |
upstream backends { | |
server service.consul service=backend resolve; | |
} | |
server { | |
status_zone default; | |
listen 80; | |
server_name _; | |
add_header X-Cache-Status $upstream_cache_status; | |
location / { | |
proxy_cache_valid 200 1m; | |
proxy_cache default; | |
proxy_cache_key $uri; | |
proxy_pass http://backends; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment