From fee681a86b8779fa53778ab30955c8adc06b3159 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 19 Mar 2019 20:42:45 +0100 Subject: Nginx conf: enbale compression by default --- install/nginx.conf.template | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'install') diff --git a/install/nginx.conf.template b/install/nginx.conf.template index cf28553a8..8e6b5e5df 100644 --- a/install/nginx.conf.template +++ b/install/nginx.conf.template @@ -4,6 +4,15 @@ server { root #INSTALL_PATH#; access_log /var/log/django/#APP_NAME#-access.log; error_log /var/log/django/#APP_NAME#-error.log; + + gzip on; + gzip_disable "msie6"; + gzip_comp_level 6; + gzip_min_length 1100; + gzip_buffers 16 8k; + gzip_proxied any; + gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/rss+xml image/svg+xml; + # if you change client_max_body_size do not forget to change it also # to your corresponding local_settings.py file client_max_body_size #MAX_UPLOAD_SIZE#M; -- cgit v1.2.3