Skip to content

Commit 709e52e

Browse files
committed
Allow to generate custom locations in web_server mode
1 parent 33f72ee commit 709e52e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

templates/http/default.conf.j2

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ server {
3939
{% endfor %}
4040
{% endif %}
4141
{% if item.value.web_server is defined %}
42-
location / {
43-
root {{ item.value.web_server.html_file_location }};
44-
index {{ item.value.web_server.html_file_name }};
42+
{% for location in item.value.web_server.locations %}
43+
location {{ item.value.web_server.locations[location].location }} {
44+
root {{ item.value.web_server.locations[location].html_file_location }};
45+
index {{ item.value.web_server.locations[location].html_file_name }};
4546
}
47+
{% endfor %}
4648
{% if item.value.web_server.http_demo_conf %}
4749
sub_filter_once off;
4850
sub_filter 'server_hostname' '$hostname';

0 commit comments

Comments
 (0)