redirect to www. https

This commit is contained in:
2025-11-21 12:39:36 +00:00
parent f4ab7493f0
commit 841fcb6be3

View File

@@ -20,15 +20,21 @@ http {
# Redirect everything else to HTTPS
location / {
return 301 https://$host$request_uri;
return 301 https://www.$DOMAIN$request_uri;
}
}
server {
listen 443 ssl;
server_name $DOMAIN;
return 301 https://www.$DOMAIN$request_uri;
}
server {
listen 443 ssl;
http2 on;
server_name $DOMAIN www.$DOMAIN;
server_name www.$DOMAIN;
root /etc/nginx/html;
index index.html;