added location support
This commit is contained in:
parent
837e8e0531
commit
ba448f3185
2 changed files with 22 additions and 0 deletions
|
|
@ -16,6 +16,10 @@ server {
|
|||
listen [::]:{{ vhost_listen.nossl_port|default(80) }} ssl {% if vhost.default_server|default(False) %}default_server{% endif %};
|
||||
{% endif %}
|
||||
|
||||
{% for header in vhost.add_headers|default([]) %}
|
||||
add_header {{ header }} {{ vhost.add_headers[header] }};
|
||||
{% endfor %}
|
||||
|
||||
{% if vhost.backend|default(False) %}
|
||||
location / {
|
||||
proxy_pass {{ vhost.backend }};
|
||||
|
|
@ -36,6 +40,12 @@ server {
|
|||
}
|
||||
{% endif %}
|
||||
|
||||
{% for location in vhost.locations|default([]) %}
|
||||
location {{ location.match }} {
|
||||
{% if location.alias %}alias {{ location.alias }};{% endif %}
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
{% if vhost.letsencrypt|d(False) %}
|
||||
ssl_certificate /etc/ssl/letsencrypt_{{ vhost_name }}_chained.crt;
|
||||
ssl_certificate_key /etc/ssl/private/letsencrypt_{{ vhost_name }}.key;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue