diff options
Diffstat (limited to 'roles/nginx/templates')
-rw-r--r-- | roles/nginx/templates/nginx.conf.j2 | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/roles/nginx/templates/nginx.conf.j2 b/roles/nginx/templates/nginx.conf.j2 new file mode 100644 index 0000000..1188e53 --- /dev/null +++ b/roles/nginx/templates/nginx.conf.j2 @@ -0,0 +1,73 @@ +user www-data; +worker_processes auto; +{% if nginx_worker_rlimit_nofile is defined %} +worker_rlimit_nofile {{ nginx_worker_rlimit_nofile }}; +{% endif %} +pid /run/nginx.pid; +error_log /dev/null debug; +error_log syslog:server=unix:/dev/log,facility=daemon,tag=nginx notice; + +include /etc/nginx/modules-enabled/*.conf; + +events { + worker_connections {{ nginx_worker_connections }}; + # multi_accept on; +} + +http { + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + types_hash_max_size 2048; + # server_tokens off; + + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + ## + # Resolver + ## + + resolver 127.0.0.53 valid=30s; # systemd-resolved listens here + + ## + # SSL Settings + ## + + ssl_protocols {{ nginx_ssl_protocols }}; + ssl_ciphers {{ nginx_ssl_ciphers }}; + ssl_prefer_server_ciphers off; + ssl_dhparam /etc/nginx/dhparam; + + ## + # Logging Settings + ## + + access_log off; + + ## + # Gzip Settings + ## + + gzip on; + + # gzip_vary on; + # gzip_proxied any; + # gzip_comp_level 6; + # gzip_buffers 16 8k; + # gzip_http_version 1.1; + # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + ## + # Virtual Host Configs + ## + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; +} |