Files
ROLAC/deploy/nginx/conf.d/rolac.conf
T
Chris Chen 5dfca873dd
ci-cd-vm / ci-cd (push) Successful in 1m23s
update for shrink image size.
2026-06-23 13:30:20 -07:00

30 lines
1.0 KiB
Plaintext

server { # HTTP -> HTTPS
listen 80;
server_name app.rolac.org api.rolac.org;
location /.well-known/acme-challenge/ { root /var/www/certbot; }
location / { return 301 https://$host$request_uri; }
}
server {
listen 443 ssl;
server_name app.rolac.org;
ssl_certificate /etc/letsencrypt/live/app.rolac.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/app.rolac.org/privkey.pem;
location /api/ {
# nginx defaults to 1 MB, which 413s phone-camera receipt uploads before they
# reach the API. Keep this >= the largest API [RequestSizeLimit] (offerings = 50 MB)
# so the per-endpoint limits in the controllers stay the real authority.
client_max_body_size 50m;
proxy_pass http://api:8080/api/;
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;
}
location / {
proxy_pass http://app:80;
}
}