2017-10-27 11:41:00 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
2018-02-25 17:51:24 +01:00
|
|
|
listen [::]:80;
|
2018-09-24 15:14:09 +02:00
|
|
|
server_name firmware.{{ http_domain_external }} firmware.{{ http_domain_internal }};
|
2017-10-27 11:41:00 +02:00
|
|
|
|
|
|
|
charset utf-8;
|
|
|
|
server_tokens off;
|
|
|
|
|
2018-06-15 09:08:25 +02:00
|
|
|
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
|
|
|
|
|
|
|
root /var/www/html/firmware;
|
|
|
|
location / {
|
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size off;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
listen [::]:443 ssl;
|
2018-09-24 15:14:09 +02:00
|
|
|
server_name firmware.{{ http_domain_external }} firmware.{{ http_domain_internal }};
|
2018-06-15 09:08:25 +02:00
|
|
|
|
2018-11-27 10:34:11 +01:00
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
|
2018-06-15 09:08:25 +02:00
|
|
|
charset utf-8;
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
ssl_certificate /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/privkey.pem;
|
|
|
|
|
|
|
|
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
|
|
|
|
2017-10-27 11:41:00 +02:00
|
|
|
root /var/www/html/firmware;
|
|
|
|
location / {
|
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size off;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{% for mesh in meshes %}
|
|
|
|
server {
|
|
|
|
listen 80;
|
2018-02-25 17:51:24 +01:00
|
|
|
listen [::]:80;
|
2018-09-24 15:14:09 +02:00
|
|
|
server_name firmware.{{ mesh.http_domain_external }} firmware.{{ mesh.http_domain_internal }};
|
2017-10-27 11:41:00 +02:00
|
|
|
|
|
|
|
charset utf-8;
|
|
|
|
server_tokens off;
|
|
|
|
|
2018-06-15 09:08:25 +02:00
|
|
|
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
|
|
|
|
|
|
|
root /var/www/html/firmware/{{ mesh.site_name.lower() }};
|
|
|
|
location / {
|
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size off;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
listen [::]:443 ssl;
|
2018-09-24 15:14:09 +02:00
|
|
|
server_name firmware.{{ mesh.http_domain_external }} firmware.{{ mesh.http_domain_internal }};
|
2018-06-15 09:08:25 +02:00
|
|
|
|
2018-11-27 10:34:11 +01:00
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
|
2018-06-15 09:08:25 +02:00
|
|
|
charset utf-8;
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
ssl_certificate /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/privkey.pem;
|
|
|
|
|
|
|
|
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
|
|
|
|
2017-10-27 11:41:00 +02:00
|
|
|
root /var/www/html/firmware/{{ mesh.site_name.lower() }};
|
|
|
|
location / {
|
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size off;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{% if not loop.last %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|