summaryrefslogtreecommitdiff
path: root/roles/nginx/base
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nginx/base')
-rw-r--r--roles/nginx/base/defaults/main.yml2
-rw-r--r--roles/nginx/base/tasks/main.yml9
2 files changed, 11 insertions, 0 deletions
diff --git a/roles/nginx/base/defaults/main.yml b/roles/nginx/base/defaults/main.yml
index 9dd53cdf..79c79b49 100644
--- a/roles/nginx/base/defaults/main.yml
+++ b/roles/nginx/base/defaults/main.yml
@@ -14,3 +14,5 @@ nginx_snippets:
nginx_dhparam_size: 2048
nginx_stream_module: no
+
+# nginx_server_names_hash_bucket_size: 64
diff --git a/roles/nginx/base/tasks/main.yml b/roles/nginx/base/tasks/main.yml
index b0e7df5b..572b1513 100644
--- a/roles/nginx/base/tasks/main.yml
+++ b/roles/nginx/base/tasks/main.yml
@@ -33,3 +33,12 @@
- name: install and setup stream module
when: nginx_stream_module
import_tasks: stream.yml
+
+- name: configure server_names_hash_bucket_size
+ when: nginx_server_names_hash_bucket_size is defined
+ lineinfile:
+ regexp: "^(\\s*)#?\\s*server_names_hash_bucket_size\\s"
+ line: "\\1server_names_hash_bucket_size {{ nginx_server_names_hash_bucket_size }};"
+ dest: /etc/nginx/nginx.conf
+ backrefs: yes
+ notify: restart nginx