ansible-role-nginx/templates/nginx.conf.j2

39 lines
981 B
Plaintext
Raw Permalink Normal View History

2018-09-15 02:27:12 +02:00
user {{ nginx_main_template_user }};
worker_processes {{ nginx_main_template_worker_processes }};
2018-09-15 02:27:12 +02:00
error_log /var/log/nginx/error.log {{ nginx_main_template_error_level }};
pid /var/run/nginx.pid;
events {
2018-09-15 02:27:12 +02:00
worker_connections {{ nginx_main_template_worker_connections }};
}
2018-09-15 02:27:12 +02:00
{% if nginx_http_template_enable %}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
2018-09-15 02:27:12 +02:00
keepalive_timeout {{ nginx_http_template_keepalive_timeout }};
#gzip on;
include /etc/nginx/conf.d/http/*.conf;
}
{% endif %}
2018-09-15 02:27:12 +02:00
{% if nginx_stream_template_enable %}
stream {
include /etc/nginx/conf.d/stream/*.conf;
}
{% endif %}