|
|
|
@ -10,18 +10,18 @@ |
|
|
|
|
server { |
|
|
|
|
{% if vhost.port is iterable %} |
|
|
|
|
{% for port in vhost.port %} |
|
|
|
|
listen {{ port }}; |
|
|
|
|
listen {{ port }}{% if vhost.name == '_' %} default_server{% endif %}; |
|
|
|
|
{% endfor %} |
|
|
|
|
{% else %} |
|
|
|
|
listen {{ vhost.port }}; |
|
|
|
|
listen {{ vhost.port }}{% if vhost.name == '_' %} default_server{% endif %}; |
|
|
|
|
{% endif %} |
|
|
|
|
{% if vhost.ssl.enabled %} |
|
|
|
|
{% if vhost.ssl.port is iterable %} |
|
|
|
|
{% for port in vhost.ssl.port %} |
|
|
|
|
listen {{ port }} ssl http2; |
|
|
|
|
listen {{ port }} ssl http2{% if vhost.name == '_' %} default_server{% endif %}; |
|
|
|
|
{% endfor %} |
|
|
|
|
{% else %} |
|
|
|
|
listen {{ vhost.ssl.port }} ssl http2; |
|
|
|
|
listen {{ vhost.ssl.port }} ssl http2{% if vhost.name == '_' %} default_server{% endif %}; |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
{% if vhost.ssl.cert is defined and vhost.ssl.key is defined %} |
|
|
|
|