diff --git a/roles/docker-nextcloud/templates/nextcloud.conf.j2 b/roles/docker-nextcloud/templates/nextcloud.conf.j2 index eba052bb..165645e6 100644 --- a/roles/docker-nextcloud/templates/nextcloud.conf.j2 +++ b/roles/docker-nextcloud/templates/nextcloud.conf.j2 @@ -12,15 +12,6 @@ server client_body_buffer_size 400M; fastcgi_buffers 64 4K; - # Enable gzip but do not remove ETag headers - gzip on; - gzip_vary on; - gzip_comp_level 4; - gzip_min_length 256; - gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; - gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; - - {% include 'roles/native-nginx-docker-proxy/templates/proxy_pass.conf.j2' %} location ^~ /.well-known { diff --git a/roles/native-docker/Readme.md b/roles/native-docker/Readme.md index bc162e8b..0a0a409f 100644 --- a/roles/native-docker/Readme.md +++ b/roles/native-docker/Readme.md @@ -1,4 +1,7 @@ # role native-docker +## performance +- https://forums.docker.com/t/mysql-slow-performance-in-docker/37179/21 + ## see - https://stackoverflow.com/questions/37599128/docker-how-do-you-disable-auto-restart-on-a-container diff --git a/roles/native-nginx/readme.md b/roles/native-nginx/readme.md index 673f153c..2b6eeb4a 100644 --- a/roles/native-nginx/readme.md +++ b/roles/native-nginx/readme.md @@ -4,3 +4,4 @@ - https://www.nginx.com/blog/tuning-nginx/ - 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 diff --git a/roles/native-nginx/templates/nginx.conf.j2 b/roles/native-nginx/templates/nginx.conf.j2 index 952dadf5..011c5fb8 100644 --- a/roles/native-nginx/templates/nginx.conf.j2 +++ b/roles/native-nginx/templates/nginx.conf.j2 @@ -14,11 +14,16 @@ http error_log syslog:server=unix:/dev/log; sendfile on; keepalive_timeout 65; + + # gzip gzip on; gzip_proxied any; - gzip_types text/plain text/xml text/css application/x-javascript text/javascript application/xml+rss; gzip_vary on; - gzip_disable "MSIE [1-6]\.(?!.*SV1)"; + gzip_disable "MSIE [1-6]\.(?!.*SV1)"; # Disable for Internetexplorer 6 + gzip_comp_level 4; + gzip_min_length 256; + gzip_types application/atom+xml application/javascript application/xml+rss application/x-javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy text/javascript text/xml; + types_hash_max_size 4096; include conf.d/*.conf; }