43 lines
1.2 KiB
Nginx Configuration File
43 lines
1.2 KiB
Nginx Configuration File
events {}
|
|
http {
|
|
upstream dashboard {
|
|
server 127.0.0.1:3000;
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
# Optional: HTTP auf HTTPS weiterleiten
|
|
# return 301 https://$host$request_uri;
|
|
|
|
location / {
|
|
proxy_pass http://dashboard;
|
|
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;
|
|
}
|
|
}
|
|
server {
|
|
listen 443 ssl;
|
|
server_name _;
|
|
|
|
ssl_certificate /etc/nginx/certs/dev.crt;
|
|
ssl_certificate_key /etc/nginx/certs/dev.key;
|
|
|
|
location /api/ {
|
|
proxy_pass http://infoscreen-api:8000/api/;
|
|
}
|
|
location /screenshots/ {
|
|
proxy_pass http://infoscreen-api:8000/screenshots/;
|
|
}
|
|
location / {
|
|
proxy_pass http://dashboard;
|
|
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;
|
|
}
|
|
}
|
|
}
|