diff --git a/README.md b/README.md index ff8707b..3e82505 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,10 @@ TCP connection options. See [this blog post](https://t37.net/nginx-optimization- Nginx keepalive settings. Timeout should be set higher (10s+) if you have more polling-style traffic (AJAX-powered sites especially), or lower (<10s) if you have a site where most users visit a few pages and don't send any further requests. + nginx_server_tokens: "on" + +Nginx server_tokens settings, this controlls if nginx responds with it's version in the HTTP headers, set to off to disable + nginx_client_max_body_size: "64m" This value determines the largest file upload possible, as uploads are passed through Nginx before hitting a backend like `php-fpm`. If you get an error like `client intended to send too large body`, it means this value is set too low. diff --git a/defaults/main.yml b/defaults/main.yml index f5b602a..de9a57d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -26,6 +26,8 @@ nginx_tcp_nodelay: "on" nginx_keepalive_timeout: "65" nginx_keepalive_requests: "100" +nginx_server_tokens: "on" + nginx_client_max_body_size: "64m" nginx_server_names_hash_bucket_size: "64" diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index cedfd72..f99f832 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -35,6 +35,7 @@ http { keepalive_timeout {{ nginx_keepalive_timeout }}; keepalive_requests {{ nginx_keepalive_requests }}; + server_tokens {{ nginx_server_tokens }}; #gzip on; {% if nginx_proxy_cache_path %}