Role service-nginx-firmware: forward ACME HTTP requests and enable HTTPS for vhosts
This commit is contained in:
parent
43b9bc4407
commit
f0d8d2f170
1 changed files with 44 additions and 0 deletions
|
@ -6,6 +6,28 @@ server {
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
server_tokens off;
|
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;
|
root /var/www/html/firmware;
|
||||||
location / {
|
location / {
|
||||||
autoindex on;
|
autoindex on;
|
||||||
|
@ -22,6 +44,28 @@ server {
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
server_tokens off;
|
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() }};
|
root /var/www/html/firmware/{{ mesh.site_name.lower() }};
|
||||||
location / {
|
location / {
|
||||||
autoindex on;
|
autoindex on;
|
||||||
|
|
Loading…
Reference in a new issue