Created
May 20, 2017 21:23
-
-
Save glagola/48cff1726622b54248fb716fd67641fe to your computer and use it in GitHub Desktop.
Cache generated images
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
server { | |
listen 80; | |
server_name server.ru; | |
location ~* ^/i/([^./]*) { | |
proxy_ignore_headers Expires Cache-Control; | |
proxy_cache_lock on; | |
proxy_cache_valid 24h; | |
proxy_cache_valid 404 1m; | |
proxy_cache roommates; | |
proxy_cache_key "$1-$arg_w-$arg_h"; | |
proxy_pass http://server.ru:8080; | |
} | |
location / { | |
proxy_pass http://server.ru:8080; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment