55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
server {
|
|
server_name faucet.lnpulse.app;
|
|
# No root; all locations are proxied.
|
|
|
|
# Increase body size if needed
|
|
client_max_body_size 10M;
|
|
|
|
# Backend API
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:3001/;
|
|
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;
|
|
}
|
|
|
|
# Health check passthrough
|
|
location /health {
|
|
proxy_pass http://127.0.0.1:3001/health;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
# Frontend (Vite preview server)
|
|
location / {
|
|
proxy_pass http://127.0.0.1:5173;
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
listen 443 ssl; # managed by Certbot
|
|
ssl_certificate /etc/letsencrypt/live/faucet.lnpulse.app/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/faucet.lnpulse.app/privkey.pem; # managed by Certbot
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
}
|
|
server {
|
|
if ($host = faucet.lnpulse.app) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
listen 80;
|
|
server_name faucet.lnpulse.app;
|
|
return 404; # managed by Certbot
|
|
|
|
|
|
}
|
|
|