From: Dessalines Date: Sun, 12 Jan 2020 18:28:05 +0000 (-0500) Subject: Adding proxy_cache. #408 X-Git-Url: http://these/git/readmes/%24%7B%60data:application/%7B%60%24%7BghostArchiveUrl%7D/static/%7B%60%24%7BarchiveUrl%7D/%7Bthis.state.user.avatar%7D?a=commitdiff_plain;h=e603b52a5ba469dde2db85a4b996536c085f02bf;p=lemmy.git Adding proxy_cache. #408 --- diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index 0a420d77..1fc6e674 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -1,3 +1,5 @@ +proxy_cache_path /var/cache/lemmy_frontend levels=1:2 keys_zone=lemmy_frontend_cache:10m max_size=100m use_temp_path=off; + server { listen 80; server_name {{ domain }}; @@ -59,6 +61,13 @@ server { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + + # Proxy Cache + proxy_cache lemmy_frontend_cache; + proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; + proxy_cache_revalidate on; + proxy_cache_lock on; + proxy_cache_min_uses 5; } location /pictshare/ {