Skip to content

Instantly share code, notes, and snippets.

@clone1018
Created October 18, 2014 16:35
Show Gist options
  • Save clone1018/9af5d3f2b41ad9a2f88b to your computer and use it in GitHub Desktop.
Save clone1018/9af5d3f2b41ad9a2f88b to your computer and use it in GitHub Desktop.
location / {
try_files @www @imgd;
}
location @www {
root /srv/www/minotar.net;
index index.html;
}
location @imgd {
proxy_pass http://imgd;
proxy_cache minotar;
proxy_cache_valid 200 302 60m;
proxy_cache_valid 404 1m;
proxy_read_timeout 6s;
proxy_cache_use_stale timeout;
proxy_max_temp_file_size 1M;
proxy_http_version 1.1;
proxy_next_upstream error timeout http_500 http_503 http_504;
proxy_set_header Host minotar.net;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment