diff --git a/ansible/roles/nginx/files/etc/nginx/nginx.conf b/ansible/roles/nginx/files/etc/nginx/nginx.conf index 136753e..30d79c3 100644 --- a/ansible/roles/nginx/files/etc/nginx/nginx.conf +++ b/ansible/roles/nginx/files/etc/nginx/nginx.conf @@ -4,7 +4,7 @@ pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { - worker_connections 768; + worker_connections 1024; # multi_accept on; } @@ -16,9 +16,13 @@ http { sendfile on; tcp_nopush on; + tcp_nodelay on; types_hash_max_size 2048; # server_tokens off; + keepalive_timeout 10; + keepalive_requests 500; + # server_names_hash_bucket_size 64; # server_name_in_redirect off; @@ -36,7 +40,23 @@ http { # Logging Settings ## - access_log /var/log/nginx/access.log; + log_format ltsv "time:$time_local" + "\thost:$remote_addr" + "\tforwardedfor:$http_x_forwarded_for" + "\treq:$request" + "\tstatus:$status" + "\tmethod:$request_method" + "\turi:$request_uri" + "\tsize:$body_bytes_sent" + "\treferer:$http_referer" + "\tua:$http_user_agent" + "\treqtime:$request_time" + "\tcache:$upstream_http_x_cache" + "\truntime:$upstream_http_x_runtime" + "\tapptime:$upstream_response_time" + "\tvhost:$host"; + + access_log /var/log/nginx/access.log ltsv; error_log /var/log/nginx/error.log; ##