2019-12-31 18:43:43 +07:00
|
|
|
{% set site = nginx_sites | nginx_search_by_ssl_name(item.name) %}
|
2019-12-31 19:07:13 +07:00
|
|
|
{% set __listen = item.listen | default(nginx_default_listen) %}
|
|
|
|
{% set __listen_proxy_protocol = item.listen_proxy_protocol | default(nginx_default_listen_proxy_protocol) %}
|
2019-12-31 18:43:43 +07:00
|
|
|
|
2018-03-23 00:39:10 +07:00
|
|
|
server {
|
2019-12-31 18:43:43 +07:00
|
|
|
{% for port in __listen %}
|
|
|
|
listen {{ port }};
|
|
|
|
{% endfor %}
|
2019-12-31 19:07:13 +07:00
|
|
|
{% for port in __listen_proxy_protocol %}
|
2019-12-31 18:43:43 +07:00
|
|
|
listen {{ port }} proxy_protocol;
|
|
|
|
{% endfor %}
|
2018-03-23 02:30:10 +07:00
|
|
|
|
2019-12-31 18:43:43 +07:00
|
|
|
server_name {{ site | nginx_all_site_names | join(" ") }};
|
2018-03-23 00:39:10 +07:00
|
|
|
|
|
|
|
location / {
|
|
|
|
return 503;
|
|
|
|
}
|
|
|
|
}
|