Files
verify/deploy/nginx-verifypack.conf
Mohamed Mathar Irfan ed6610d5d8 Initial project upload
2026-07-28 17:57:02 +05:30

45 lines
1.4 KiB
Plaintext

# VerifyPack Nginx config — single EC2 instance.
# Two server names: app. (Next.js) and api. (FastAPI).
# certbot will rewrite these to add the 443 / TLS blocks automatically.
# ---------- Frontend: app.yourdomain.com ----------
server {
listen 80;
server_name app.yourdomain.com;
# Next.js
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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;
}
}
# ---------- Backend API: api.yourdomain.com ----------
server {
listen 80;
server_name api.yourdomain.com;
client_max_body_size 10M; # allow logo / document / QR image uploads
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
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;
# X-Forwarded-For carries the real client IP into scan logs
}
# Locally-stored uploads (only used when MOCK_STORAGE=1; S3 serves them otherwise)
location /uploads/ {
proxy_pass http://127.0.0.1:8000;
}
}