Files
Ansible-GUI-Small/nginx.conf
jonnybravo a8b103e2c6 v.0.01
2026-07-20 17:16:55 +02:00

44 lines
1.5 KiB
Nginx Configuration File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}
}
}