This commit is contained in:
fro
2025-10-28 15:43:28 -05:00
parent 6cb9a8b9c5
commit fef88eceb7

View File

@@ -2,27 +2,26 @@
# configuration of hw.op.fo / frode klevstul
# - - - - - - - - - - - - - - - - - - -
# enforce ssl and bare domain (without www) for http requests
# ($server_name will return the first value given)
# http to https
server {
listen 80;
server_name op.fo hw.op.fo;
return 301 https://$server_name$request_uri;
}
# www to bare domain for https requests
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/nginx/acme.sh/op.fo/fullchain.pem;
ssl_certificate_key /etc/nginx/acme.sh/op.fo/key.pem;
ssl_trusted_certificate /etc/nginx/acme.sh/op.fo/cert.pem;
server_name hw.op.fo;
return 301 $scheme://op.fo$request_uri;
return 301 https://$host$request_uri;
}
# hw to bare domain for https requests
#server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
#
# ssl_certificate /etc/nginx/acme.sh/op.fo/fullchain.pem;
# ssl_certificate_key /etc/nginx/acme.sh/op.fo/key.pem;
# ssl_trusted_certificate /etc/nginx/acme.sh/op.fo/cert.pem;
#
# server_name hw.op.fo;
# return 301 $scheme://op.fo$request_uri;
#}
# hw.op.fo
server {
listen 443 ssl http2;