This commit is contained in:
jonnybravo
2026-07-20 17:16:55 +02:00
parent ab91d5582d
commit a8b103e2c6
14 changed files with 383 additions and 120 deletions

43
nginx.conf Normal file
View File

@@ -0,0 +1,43 @@
events {}
http {
server {
listen 443 ssl;
server_name localhost man-dan-05;
ssl_certificate /etc/nginx/certs/man-dan-05.crt;
ssl_certificate_key /etc/nginx/certs/man-dan-05.key;
# WebSocket endpoint unter /api/_event an das Backend (/_event) weiterleiten
location /api/_event {
proxy_pass http://localhost:3001/_event;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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;
}
# API Präfix /api entfernen und an Backend weiterleiten
location /api/ {
proxy_pass http://localhost:3001/;
proxy_http_version 1.1;
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;
}
# Frontend (alles andere)
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
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;
}
}
}