# FRASA Ecosystem — nginx del host (modo HTTP, LAN) # Instalado en /etc/nginx/sites-available/frasa # index.html siempre se revalida (los assets de Vite llevan hash en el nombre, # así que solo el HTML necesita no-cache para que los deploys se vean al momento) map $uri $frasa_cache_control { ~*\.html$ "no-cache, no-store, must-revalidate"; default "public, max-age=31536000, immutable"; } server { listen 80 default_server; server_name _; client_max_body_size 10m; add_header Cache-Control $frasa_cache_control always; # API Gateway (servicio systemd frasa-api en 127.0.0.1:3000) location /api/ { proxy_pass http://127.0.0.1:3000; 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; } # Apps estáticas (builds de producción) location /quote/ { alias /root/frasa-ecosystem/apps/cotizador/dist/; try_files $uri $uri/ /quote/index.html; } location /client/ { alias /root/frasa-ecosystem/apps/alta-clientes/dist/; try_files $uri $uri/ /client/index.html; } location /pay/ { alias /root/frasa-ecosystem/apps/cobranza/dist/; try_files $uri $uri/ /pay/index.html; } location /ai/ { alias /root/frasa-ecosystem/apps/agente-ia/dist/; try_files $uri $uri/ /ai/index.html; } location /dash/ { alias /root/frasa-ecosystem/apps/dashboards/dist/; try_files $uri $uri/ /dash/index.html; } location /hoy/ { alias /root/frasa-ecosystem/apps/mi-dia/dist/; try_files $uri $uri/ /hoy/index.html; } # Documento entregable publicado como página web privada. # NO se enlaza desde ninguna app: sólo se llega con el enlace exacto, y lleva # noindex para que no lo indexe ningún buscador. Se regenera con # scripts/generar-web-documento.py location /doc/alcance-2f9k7d/ { alias /root/frasa-ecosystem/docs/web/alcance-2f9k7d/; index index.html; add_header Cache-Control "no-cache, no-store, must-revalidate" always; add_header X-Robots-Tag "noindex, nofollow, noarchive" always; } # Landing (raíz) location / { root /root/frasa-ecosystem/apps/landing/dist; try_files $uri $uri/ /index.html; } }