From 5807979b5eb06cebd38c9c0d4d30a2d0f8d04353 Mon Sep 17 00:00:00 2001 From: Linden Crandall Date: Fri, 7 Feb 2025 09:12:51 +0900 Subject: [PATCH] nginx letsencrypt conf file after ssl certs are created --- https/nginx/temp.conf | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 https/nginx/temp.conf diff --git a/https/nginx/temp.conf b/https/nginx/temp.conf new file mode 100644 index 0000000..42f48ec --- /dev/null +++ b/https/nginx/temp.conf @@ -0,0 +1,34 @@ +events { + worker_connections 1024; +} + +http { + + server { + listen 7757; + server_name automatisch.lasthourhosting.org; + + location ~ /.well-known/acme-challenge/ { + root /var/www/certbot; + } + + return 301 https://$host$request_uri; + } + + server { + listen 443 ssl http2; + # use ssl letsencrypt certs + ssl_certificate /etc/letsencrypt/live/automatisch.lasthourhosting.org/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/automatisch.lasthourhosting.org/privkey.pem; + server_name automatisch.lasthourhosting.org; + + + location / { + proxy_pass http://automatisch.lasthourhosting.org:7757/; + } + + location ~ /.well-known/acme-challenge/ { + root /var/www/certbot; + } + } +}