ansible-role-nginx/templates/nginx.conf.j2
Alessandro Fael Garcia 6047a1107d Refactor REST API deployment
This refactor should fix #17 and ensure that api.conf only gets created when rest_api_enable is set to true and that api.conf gets created in the correct location
2018-04-06 16:29:49 -07:00

39 lines
939 B
Django/Jinja

user {{ main_template_user }};
worker_processes {{ main_template_worker_processes }};
error_log /var/log/nginx/error.log {{ main_template_error_level }};
pid /var/run/nginx.pid;
events {
worker_connections {{ main_template_worker_connections }};
}
{% if 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;
keepalive_timeout {{ http_template_keepalive_timeout }};
#gzip on;
include /etc/nginx/conf.d/http/*.conf;
}
{% endif %}
{% if stream_template_enable %}
stream {
include /etc/nginx/conf.d/stream/*.conf;
}
{% endif %}