fleetnow/nginx.conf
kianiadee 3d420fa82e feat: FleetNow merged live+trips map SPA (nginx/Coolify)
Single-file MapLibre SPA merging live vehicle positions and historical
trips into one console. Reads the existing dashboard read-API
(fleetapi.rahamafresh.com); served as a static nginx image for Coolify.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:56:01 +03:00

32 lines
926 B
Nginx Configuration File

server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Lightweight health endpoint (Docker/Coolify probe + Traefik).
location = /healthz {
access_log off;
add_header Content-Type text/plain;
return 200 'ok';
}
# Single-page app: always fall back to index.html.
location / {
try_files $uri $uri/ /index.html;
}
# index.html must never be cached, so a redeploy is picked up immediately.
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate";
add_header X-Content-Type-Options "nosniff";
add_header Referrer-Policy "no-referrer-when-downgrade";
}
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
}