Optimized performace by disabling acces log and activating gzip

This commit is contained in:
Kevin Veen-Birkenbach 2021-01-01 21:44:34 +01:00
parent 70169030e0
commit 0a379b17c8
3 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,4 @@
# role native-nginx
## performance
- https://www.monitis.com/blog/6-best-practices-for-optimizing-your-nginx-performance/
- https://www.nginx.com/blog/tuning-nginx/

View File

@ -10,7 +10,7 @@
mode: 0755
- name: create nginx config file
template: src=nginx.conf dest=/etc/nginx/nginx.conf
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf
notify: restart nginx
- name: flush nginx service

View File

@ -9,11 +9,14 @@ http
{
include mime.types;
default_type text/html;
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
sendfile on;
keepalive_timeout 65;
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)";
types_hash_max_size 4096;
include conf.d/*.conf;
}