2017-07-15 15:24:48 +00:00
|
|
|
# {{ ansible_managed }}
|
2017-12-24 13:05:27 +00:00
|
|
|
user {{ nginx_user }} {{ nginx_group }};
|
2017-12-24 16:36:43 +00:00
|
|
|
worker_processes {{ nginx_worker_processes }};
|
2017-07-15 15:24:48 +00:00
|
|
|
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
pid /run/nginx.pid;
|
|
|
|
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
tcp_nodelay on;
|
|
|
|
types_hash_max_size 2048;
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
## Buffers
|
|
|
|
client_body_buffer_size 10K;
|
|
|
|
client_header_buffer_size 1k;
|
|
|
|
client_max_body_size 8m;
|
|
|
|
|
|
|
|
## Timeouts
|
|
|
|
client_body_timeout 12;
|
|
|
|
client_header_timeout 12;
|
|
|
|
keepalive_timeout 15;
|
|
|
|
send_timeout 10;
|
|
|
|
|
|
|
|
## Gzip Settings
|
|
|
|
gzip on;
|
|
|
|
gzip_comp_level 2;
|
|
|
|
gzip_min_length 1000;
|
|
|
|
gzip_proxied expired no-cache no-store private auth;
|
|
|
|
gzip_types text/plain application/x-javascript text/xml text/css application/xml;
|
|
|
|
|
|
|
|
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
|
|
|
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
|
|
|
# for more information.
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
|
|
|
|
## Virtual Host Configs
|
|
|
|
include /etc/nginx/sites-enabled/*;
|
|
|
|
server_names_hash_bucket_size 64;
|
|
|
|
}
|