From fca714bb5eaeb3051664f1f6d2d12447ca684963 Mon Sep 17 00:00:00 2001 From: fro Date: Thu, 30 Oct 2025 07:12:27 -0500 Subject: [PATCH] / wa.fo wip --- cfg/ngx/wa.fo.conf | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/cfg/ngx/wa.fo.conf b/cfg/ngx/wa.fo.conf index 5c0782b..292a3fc 100644 --- a/cfg/ngx/wa.fo.conf +++ b/cfg/ngx/wa.fo.conf @@ -2,13 +2,16 @@ # configuration of wa.fo / frode klevstul / oct 2025 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# sc.op.fo ➔ wa.fo +# <<<<< REDIRECTS OF OTHER DOMAINS >>>>> + +# sc.op.fo ➔ wa.fo (http) server { listen 80; server_name sc.op.fo; return 301 https://wa.fo$request_uri; } +# sc.op.fo ➔ wa.fo (https) server { listen 443 ssl; listen [::]:443 ssl; @@ -22,6 +25,31 @@ server { return 301 https://wa.fo$request_uri; } +# <<<<< SETUP OF MAIN DOMAIN >>>>> + +# enforce ssl and bare domain (http) +# ($server_name will return the first value given) +server { + listen 80; + server_name op.fo www.op.fo; + return 301 https://$server_name$request_uri; +} + + +# * ➔ bare domain (https) +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + ssl_certificate /etc/nginx/acme.sh/wa.fo/fullchain.pem; + ssl_certificate_key /etc/nginx/acme.sh/wa.fo/key.pem; + ssl_trusted_certificate /etc/nginx/acme.sh/wa.fo/cert.pem; + + server_name *.wa.fo; + return 301 $scheme://$host$request_uri; +} + + # http to https server { listen 80;