Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m
- max_size=10g inactive=72h use_temp_path=off;
- server {
- location / {
- expires max;
- resolver 8.8.8.8 ipv6=off;
- resolver_timeout 5s;
- proxy_cache my_cache;
- proxy_cache_valid 200 302 301 303 24h;
- proxy_cache_key $scheme://$host$request_uri";
- proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
- proxy_ignore_headers Cache-Control Expires Set-Cookie;
- set $proxy_host "$http_host";
- set $url "$scheme://$http_host$request_uri";
- proxy_redirect off;
- proxy_set_header Host $proxy_host;
- proxy_set_header X-Forwarded-Host $http_host;
- proxy_pass "$url";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement