diff --git a/README.md b/README.md index 89a387f..854fa32 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,10 @@ Nginx keepalive settings. Timeout should be set higher (10s+) if you have more p 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. + nginx_server_names_hash_bucket_size: "64" + +If you have many server names, or have very long server names, you might get an Nginx error on startup requiring this value to be increased. + nginx_proxy_cache_path: "" Set as the `proxy_cache_path` directive in the `nginx.conf` file. By default, this will not be configured (if left as an empty string), but if you wish to use Nginx as a reverse proxy, you can set this to a valid value (e.g. `"/var/cache/nginx keys_zone=cache:32m"`) to use Nginx's cache (further proxy configuration can be done in individual server configurations). diff --git a/defaults/main.yml b/defaults/main.yml index 7c7c893..620dc09 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -25,6 +25,8 @@ nginx_keepalive_requests: "100" nginx_client_max_body_size: "64m" +nginx_server_names_hash_bucket_size: "64" + nginx_proxy_cache_path: "" nginx_extra_conf_options: "" diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 8213eec..e9499e7 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -18,7 +18,7 @@ http { include {{ nginx_mime_file_path }}; default_type application/octet-stream; - server_names_hash_bucket_size 64; + server_names_hash_bucket_size {{ nginx_server_names_hash_bucket_size }}; client_max_body_size {{ nginx_client_max_body_size }};