|
|
@ -4,16 +4,20 @@ server {
|
|
|
|
listen [::]:80;
|
|
|
|
listen [::]:80;
|
|
|
|
|
|
|
|
|
|
|
|
server_name {{ item.key }};
|
|
|
|
server_name {{ item.key }};
|
|
|
|
# Redirect to https
|
|
|
|
|
|
|
|
location / {
|
|
|
|
access_log /var/log/nginx/http_{{ item.key }}.log;
|
|
|
|
return 302 https://$host$request_uri;
|
|
|
|
error_log /var/log/nginx/http_{{ item.key }}_error.log;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ACME directory, to limit interaction with certbot
|
|
|
|
# ACME directory, to limit interaction with certbot
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
|
|
root /var/www/well-known/acme-challenge/;
|
|
|
|
root /var/www/well-known/acme-challenge/;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Redirect to https
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
|
|
|
return 302 https://$host$request_uri;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
|
|
|
|