optimized caching reverse-proxy

This commit is contained in:
2021-01-02 10:39:20 +01:00
parent 77b75d9e37
commit 7c1732a39b
3 changed files with 24 additions and 2 deletions

View File

@@ -5,3 +5,4 @@
- https://davidwalsh.name/enable-gzip
- https://www.nginx.com/blog/performance-tuning-tips-tricks/
- https://medium.com/pixelpoint/best-practices-for-cache-control-settings-for-your-website-ff262b38c5a2
- https://www.nginx.com/blog/nginx-caching-guide/

View File

@@ -7,11 +7,16 @@ events
http
{
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:60m max_size=1G;
include mime.types;
default_type text/html;
# caching
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:10m max_size=10g inactive=7d use_temp_path=off;
# logs
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
sendfile on;
keepalive_timeout 65;