From bb979ac003a7d6e270f5233bd3c95f3b0fe0205c Mon Sep 17 00:00:00 2001 From: Linden Crandall Date: Sat, 8 Feb 2025 04:59:36 +0900 Subject: [PATCH] ports 443 and 80 conflict fix --- docker-compose.yml | 2 +- https/nginx/automatisch_letsencrypt_nginx.conf | 1 + .../automatisch_letsencrypt_nginx_template.conf | 1 + .../secondary_automatisch_letsencrypt_nginx.conf | 12 +++++++++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index eac9877..f250ee4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: - ./certbot/www:/var/www/certbot ports: - ${PORT}:${PORT} - - 443:443 + - ${PORT}:443 certbot: image: certbot/certbot:latest diff --git a/https/nginx/automatisch_letsencrypt_nginx.conf b/https/nginx/automatisch_letsencrypt_nginx.conf index 89d5848..6cfca2e 100644 --- a/https/nginx/automatisch_letsencrypt_nginx.conf +++ b/https/nginx/automatisch_letsencrypt_nginx.conf @@ -9,6 +9,7 @@ http { server { listen 7757; + listen [::]:7757; server_name ; location / { diff --git a/https/nginx/automatisch_letsencrypt_nginx_template.conf b/https/nginx/automatisch_letsencrypt_nginx_template.conf index 89d5848..6cfca2e 100644 --- a/https/nginx/automatisch_letsencrypt_nginx_template.conf +++ b/https/nginx/automatisch_letsencrypt_nginx_template.conf @@ -9,6 +9,7 @@ http { server { listen 7757; + listen [::]:7757; server_name ; location / { diff --git a/https/nginx/secondary_automatisch_letsencrypt_nginx.conf b/https/nginx/secondary_automatisch_letsencrypt_nginx.conf index 39a9748..6e63b89 100644 --- a/https/nginx/secondary_automatisch_letsencrypt_nginx.conf +++ b/https/nginx/secondary_automatisch_letsencrypt_nginx.conf @@ -8,7 +8,10 @@ events { http { server { + listen 7757; + listen [::]:7757; + server_name ; location ~ /.well-known/acme-challenge/ { @@ -19,7 +22,10 @@ http { } server { - listen 443 ssl http2; + + listen 7757 ssl http2; + listen [::]:7757 ssl http2; + # use ssl letsencrypt certs ssl_certificate /etc/letsencrypt/live//fullchain.pem; ssl_certificate_key /etc/letsencrypt/live//privkey.pem; @@ -28,6 +34,10 @@ http { location / { proxy_pass http://:7757/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; } location ~ /.well-known/acme-challenge/ {