From b910a3d999e60b2b8a63b9dab5a2bd47d8ec8860 Mon Sep 17 00:00:00 2001 From: UserIsMH Date: Mon, 9 Jun 2025 13:50:57 +0200 Subject: [PATCH] Nginx Confix Anpassung in Hinblick auf den API Lizenz Container --- JOURNAL.md | 19 +++++++++++++++++++ THE_ROAD_SO_FAR.md | 10 +--------- v2_nginx/nginx.conf | 7 +++++-- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/JOURNAL.md b/JOURNAL.md index 1539a08..8fc864f 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -2118,6 +2118,25 @@ Ein Pool-System für Domains, IPv4-Adressen und Telefonnummern, wobei bei jeder - Status und Todos sind immer aktuell an einem Ort - Klare Trennung zwischen Historie und Planung - Einfacher für neue Entwickler einzusteigen + +### 2025-06-09: Nginx Config angepasst + +**Änderung:** +- proxy_pass für License Server von `https://license-server:8443` auf `http://license-server:8443` geändert +- `proxy_ssl_verify off` entfernt (nicht mehr nötig bei HTTP) +- WebSocket-Support hinzugefügt (für zukünftige Features) + +**Grund:** +- License Server läuft intern auf HTTP (wie Admin Panel) +- SSL-Termination erfolgt nur am Nginx +- Vereinfachte Konfiguration ohne doppelte SSL-Verschlüsselung + +**Hinweis:** +Docker-Container müssen neu gestartet werden, damit die Änderung wirksam wird: +```bash +docker-compose down +docker-compose up -d +``` - `v2_adminpanel/templates/profile.html` - Komplett überarbeitet - `v2_adminpanel/templates/setup_2fa.html` - Neues Step-by-Step Design - `v2_adminpanel/templates/backup_codes.html` - Modernisiertes Layout diff --git a/THE_ROAD_SO_FAR.md b/THE_ROAD_SO_FAR.md index e1df7ee..1927ab4 100644 --- a/THE_ROAD_SO_FAR.md +++ b/THE_ROAD_SO_FAR.md @@ -64,11 +64,7 @@ Stand: 09.06.2025 - 14:45 Uhr ## 🎯 Nächste Schritte (Priorität Hoch) -1. **Nginx Config Fix** - - `proxy_pass https://license-server:8443` → `proxy_pass http://license-server:8443` - - License Server wird auf HTTP laufen (SSL übernimmt Nginx) - -2. **License Server API implementieren** +1. **License Server API implementieren** - Flask-Anwendung mit PostgreSQL-Anbindung - `/api/version` - Versionscheck - `/api/validate` - Lizenzvalidierung @@ -107,10 +103,6 @@ Stand: 09.06.2025 - 14:45 Uhr - OK für PoC - Muss für Produktion geändert werden (siehe Best Practices im JOURNAL) -2. **Nginx proxy_pass** - - Zeigt noch auf https:// statt http:// - - Muss angepasst werden - ## 💡 Nice-to-have / Dokumentation 1. **README.md erstellen** diff --git a/v2_nginx/nginx.conf b/v2_nginx/nginx.conf index 7a7ce9e..5830a2f 100644 --- a/v2_nginx/nginx.conf +++ b/v2_nginx/nginx.conf @@ -84,13 +84,16 @@ http { add_header Referrer-Policy "strict-origin-when-cross-origin" always; location / { - proxy_pass https://license-server:8443; + proxy_pass http://license-server:8443; 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 $scheme; - proxy_ssl_verify off; + # WebSocket support (falls benötigt) + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; } } } \ No newline at end of file