Role service-nginx-firmware: forward ACME HTTP requests and enable HTTPS for vhosts

This commit is contained in:
Julian Labus 2018-06-15 09:08:25 +02:00
parent 43b9bc4407
commit f0d8d2f170
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A

View file

@ -6,6 +6,28 @@ server {
charset utf-8;
server_tokens off;
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;
server_name firmware.{{ http_domain_internal }} firmware.{{ http_domain_external }};
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;
root /var/www/html/firmware;
location / {
autoindex on;
@ -22,6 +44,28 @@ server {
charset utf-8;
server_tokens off;
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;
server_name firmware.{{ mesh.http_domain_internal }} firmware.{{ mesh.http_domain_external }};
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;
root /var/www/html/firmware/{{ mesh.site_name.lower() }};
location / {
autoindex on;