WIP: generiek nginx role
This commit is contained in:
parent
ea3b17ef2d
commit
8df1cba71c
14 changed files with 278 additions and 15 deletions
35
roles/nginx/templates/etc-nginx.conf.j2
Normal file
35
roles/nginx/templates/etc-nginx.conf.j2
Normal file
|
@ -0,0 +1,35 @@
|
|||
# {{ 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/*;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue