Nginx was configured as the public entry point for the Photon development services on
photonbolt.xyz subdomains.
dev-rpc.photonbolt.xyz - proxied to internal Bitcoin RPC on 127.0.0.1:18443dev-proxy.photonbolt.xyz - proxied to RGB proxy on 127.0.0.1:3000dev-index.photonbolt.xyz - HTTPS info page on 443 and Electrs TLS stream on 50002 forwarding to 127.0.0.1:50001faucet.photonbolt.xyz - proxied to the regtest faucet backend on 127.0.0.1:8788
Certbot was used with the Nginx plugin to issue and deploy a SAN certificate named
photonbolt.xyz-dev-stack for:
dev-rpc.photonbolt.xyzdev-proxy.photonbolt.xyzdev-index.photonbolt.xyzfaucet.photonbolt.xyz
Certificate path:
/etc/letsencrypt/live/photonbolt.xyz-dev-stack/fullchain.pem
/etc/nginx/sites-enabled/* from /etc/nginx/nginx.confstream include path: /etc/nginx/stream-conf.d/*.conf/etc/nginx/nginx.conf/etc/nginx/sites-available/dev-rpc.photonbolt.xyz.conf/etc/nginx/sites-available/dev-proxy.photonbolt.xyz.conf/etc/nginx/sites-available/dev-index.photonbolt.xyz.conf/etc/nginx/sites-available/faucet.photonbolt.xyz.conf/etc/nginx/stream-conf.d/dev-index.photonbolt.xyz.conf
For the HTTP reverse proxies, standard forwarded headers were configured:
Host, X-Real-IP, X-Forwarded-For, and
X-Forwarded-Proto.
The faucet host proxies plain HTTP traffic from Nginx to the local Node backend on
127.0.0.1:8788. The backend itself handles the static UI and the faucet API paths.
For RGB proxy uploads, client_max_body_size 50M was set.
Electrs uses a raw TCP protocol rather than HTTP. Because of that, an Nginx
stream listener was added. The external TLS listener was set to
dev-index.photonbolt.xyz:50002 and proxies to the local Electrs backend
at 127.0.0.1:50001.
The HTTPS site on dev-index.photonbolt.xyz returns an informational message
that points users to the TLS Electrum endpoint on port 50002.
nginx -t passed after the final adjustmentscertbot.timer remained active for auto-renewal
While enabling sites-enabled, an older duplicate site entry for
db.swapunits.online became active. That duplicate symlink was removed again
to restore a single active db site definition.
db.swapunits.online is still not healthy, but the current problem is not the
Photon reverse proxy configuration. Nginx reaches the db virtual host, then fails with
502 Bad Gateway because the configured upstream
127.0.0.1:5051 is not listening.
In short:
5051 being down