Files
solar-pv-dashboard/frontend/nginx.conf
Mateusz Gruszczyński c5cc2efbac first commit
2026-03-23 15:56:18 +01:00

30 lines
741 B
Nginx Configuration File

server {
listen 80;
server_name _;
server_tokens off;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://backend:8105;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location = /health {
proxy_pass http://backend:8105/health;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
try_files $uri $uri/ /index.html;
}
}