diff --git a/tasks/steps/setup.yml b/tasks/steps/setup.yml index d0ade96..3f4b1a5 100644 --- a/tasks/steps/setup.yml +++ b/tasks/steps/setup.yml @@ -22,6 +22,7 @@ __nginx_user: "stackhead" root_group: "stackhead" nginx_extra_conf_options: "{{ module.config.extra_conf_options|default({}) }}" + nginx_extra_conf_http_options: "{{ module.config.extra_conf_http_options|default({}) }}" include_role: name: geerlingguy.nginx - name: adjust owner of /var/www directories diff --git a/templates/nginx/nginx.conf.j2 b/templates/nginx/nginx.conf.j2 index 0a9c7d0..f914d26 100644 --- a/templates/nginx/nginx.conf.j2 +++ b/templates/nginx/nginx.conf.j2 @@ -25,6 +25,12 @@ events { {% endblock %} http { +{% if nginx_extra_conf_http_options %} +{% for k,v in nginx_extra_conf_http_options.items() %} + {{ k }} {{ v }}; +{% endfor %} +{% endif %} + {% block http_begin %} # Enable gzip compression. include /etc/nginx/h5bp/web_performance/compression.conf;