ansible/roles/nginx/templates/etc-nginx.conf.j2

35 lines
932 B
Django/Jinja

# {{ ansible_managed }}
user {{ nginx_user }};
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 16384;
include {{ nginx_modules_dir }}/*.conf;
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Default nginx log format with $request time added
log_format bitlair '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time';
access_log /var/log/nginx/access.log bitlair;
gzip on;
gzip_disable "msie6";
{% for line in nginx_http_extra | default([]) %}
{{ line }}
{% endfor %}
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}