From fef88eceb74b210818541a950bba86525418325f Mon Sep 17 00:00:00 2001 From: fro Date: Tue, 28 Oct 2025 15:43:28 -0500 Subject: [PATCH] u --- cfg/ngx/hw.op.fo.conf | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/cfg/ngx/hw.op.fo.conf b/cfg/ngx/hw.op.fo.conf index 6c11a90..b4ebc22 100644 --- a/cfg/ngx/hw.op.fo.conf +++ b/cfg/ngx/hw.op.fo.conf @@ -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;