diff --git a/templates/nginx.conf b/templates/nginx.conf index 7aca70e..cb95967 100644 --- a/templates/nginx.conf +++ b/templates/nginx.conf @@ -69,15 +69,12 @@ http { proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; - } - location ~ ^/(static/(thumbnails|previews|avatars)|client)/ { - proxy_pass http://peertube:9000; + proxy_cache peertube_cache; proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; proxy_cache_revalidate on; - proxy_cache_min_uses 3; proxy_cache_lock on; - add_header X-Cached $upstream_cache_status; + #add_header X-Cached $upstream_cache_status; } location ~ ^/static/(webseed|redundancy)/ { # NOTE: Its not possible to use proxy_cache for files that are served from disk without complicated workarounds