Files
FRASA-CAS/nginx/nginx.http.conf
Consult AS Technology 05f6ceb01a feat: deploy en host LXC (nginx + systemd) y ajustes para mismo-origen
- deploy/nginx-host.conf: nginx del host sirve dist/ de las 4 apps y
  proxifica /api/ a 127.0.0.1:3000 (client_max_body_size 10m)
- deploy/frasa-api.service: API Gateway como servicio systemd
- landing: URLs relativas (/quote/, /client/, /pay/)
- Dockerfiles de apps: ARG VITE_API_URL=/api para builds same-origin
- docker-compose: NGINX_CONF parametrizado (nginx.http.conf sin SSL)
- README: instrucciones para host LXC y nota de DDNS pendiente
2026-08-22 00:05:28 +00:00

40 lines
1.4 KiB
Plaintext

# FRASA Ecosystem — reverse proxy (modo HTTP, red local)
# Se usa cuando aun no hay certificado SSL (DDNS sin apuntar a este servidor).
# Cuando el dominio resuelva aqui: certbot --webroot y volver a nginx.conf (443).
server {
listen 80;
server_name _;
# Uploads de hasta 10MB (expedientes de clientes)
client_max_body_size 10m;
# Challenge de Let's Encrypt (para cuando se expida el cert)
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
# API Gateway
location /api/ {
proxy_pass http://api: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 web (cada contenedor sirve su SPA con su base path)
location /quote/ { proxy_pass http://cotizador:80; proxy_set_header Host $host; }
location /client/ { proxy_pass http://alta-clientes:80; proxy_set_header Host $host; }
location /pay/ { proxy_pass http://cobranza:80; proxy_set_header Host $host; }
# Landing (raíz)
location / {
proxy_pass http://landing:80;
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;
}
}