/ wa.fo wip

This commit is contained in:
fro
2025-10-30 07:12:27 -05:00
parent 08e3550e9a
commit fca714bb5e

View File

@@ -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;