Files
srv-pub/cfg/ngx/curiouscreators.com.conf
T
committer@tuxwarrior 02b04f88e9 jongleur ➔ bookrack
2026-05-25 13:10:48 -05:00

50 lines
1.5 KiB
Plaintext

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# configuration of curiouscreators.com / frode klevstul / oct 2025
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# enforce ssl and bare domain (without www) for http requests
# ($server_name will return the first value given)
server {
listen 80;
server_name curiouscreators.com www.curiouscreators.com;
return 301 https://$server_name$request_uri;
}
# www to bare domain for https requests
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
ssl_certificate /etc/nginx/acme.sh/curiouscreators.com/fullchain.pem;
ssl_certificate_key /etc/nginx/acme.sh/curiouscreators.com/key.pem;
ssl_trusted_certificate /etc/nginx/acme.sh/curiouscreators.com/cert.pem;
server_name www.curiouscreators.com;
return 301 $scheme://curiouscreators.com$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
ssl_certificate /etc/nginx/acme.sh/curiouscreators.com/fullchain.pem;
ssl_certificate_key /etc/nginx/acme.sh/curiouscreators.com/key.pem;
ssl_trusted_certificate /etc/nginx/acme.sh/curiouscreators.com/cert.pem;
#root /var/www/curiouscreators.com/jongleur;
root /var/www/bookrack;
index index.html;
server_name curiouscreators.com;
# redirect 404 not found to the root
location / {
error_page 404 = @myownredirect;
}
location @myownredirect {
return 302 /;
}
}