Skip to content

Commit

Permalink
Merge branch 'thiagotalma-patch-3'
Browse files Browse the repository at this point in the history
  • Loading branch information
drybjed committed Apr 17, 2017
2 parents b2310ac + 8fb5137 commit 85136bf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/defaults-detailed.rst
Expand Up @@ -123,6 +123,16 @@ Common webserver options
List of ports, IP addresses or sockets this server configuration should
listen on for HTTPS connections.

``include_files_begin``
Optional, list of strings.
List of files that will be included at the beginning of the server
configuration using `include`.

``include_files_end``
Optional, list of strings.
List of files that will be included at the end of the server
configuration using `include`.


Redirects
~~~~~~~~~
Expand Down
12 changes: 12 additions & 0 deletions templates/etc/nginx/sites-available/default.conf.j2
Expand Up @@ -251,6 +251,12 @@

{% endfor %}
{% endif %}
{% if item.include_files_begin|d() %}
{% for file in item.include_files_begin %}
include {{ file }};
{% endfor %}

{% endif %}
{% if item.error_pages_list|d() %}
{% for element in item.error_pages_list %}
{% if element.location|d() or element.location_options|d() %}
Expand Down Expand Up @@ -385,6 +391,12 @@
{% endblock %}
{% block nginx_tpl_block_custom_locations %}
{% endblock %}
{% if item.include_files_end|d() %}

{% for file in item.include_files_end %}
include {{ file }};
{% endfor %}
{% endif %}
{% endif %}
{% endmacro %}
{#
Expand Down

0 comments on commit 85136bf

Please sign in to comment.