add location for acme; update scripts

This commit is contained in:
Philip Henning 2024-11-19 12:11:49 +01:00
parent c237c41457
commit ac1e1f7008
4 changed files with 19 additions and 7 deletions

View file

@ -33,7 +33,15 @@ server {
listen [::]:${NGINX_HTTP_PORT};
server_name ${NGINX_SERVERNAME};
return 302 https://$host$request_uri;
# Exclude Let's Encrypt directory from redirection
location /.well-known/acme-challenge/ {
root /var/www/letsencrypt;
}
# Redirect all other traffic to HTTPS
location / {
return 302 https://$host$request_uri;
}
}
# HTTPS Server