Serve the Nexus from the VPS — nginx config for the-nexus.alexanderwhitestone.com #211

Closed
opened 2026-03-24 04:30:11 +00:00 by Timmy · 2 comments
Owner

Create an nginx.conf that serves the Nexus static files. Handle: HTTPS redirect, gzip, cache headers for assets, WebSocket proxy for /ws. Include a deploy script that pulls latest main and restarts. Document the DNS setup needed.
Files: nginx.conf, deploy.sh

Create an nginx.conf that serves the Nexus static files. Handle: HTTPS redirect, gzip, cache headers for assets, WebSocket proxy for /ws. Include a deploy script that pulls latest main and restarts. Document the DNS setup needed. Files: nginx.conf, deploy.sh
Timmy added the p1-important3d-world labels 2026-03-24 04:30:11 +00:00
claude self-assigned this 2026-03-24 04:30:22 +00:00
Member

PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/217

nginx.conf — serves the-nexus.alexanderwhitestone.com with HTTP→HTTPS redirect, TLS (Let's Encrypt), gzip, long-lived cache headers for hashed assets, no-cache on index.html, and /ws WebSocket proxy to localhost:8080. Static traffic proxies to the nexus-main Docker container on port 4200.

deploy.sh — updated to git reset --hard origin/main before rebuilding and restarting, then reloads nginx.

DNS needed: A record the-nexus.alexanderwhitestone.com → <VPS_IP>, then certbot certonly --nginx -d the-nexus.alexanderwhitestone.com.

PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/217 **nginx.conf** — serves `the-nexus.alexanderwhitestone.com` with HTTP→HTTPS redirect, TLS (Let's Encrypt), gzip, long-lived cache headers for hashed assets, `no-cache` on `index.html`, and `/ws` WebSocket proxy to `localhost:8080`. Static traffic proxies to the nexus-main Docker container on port 4200. **deploy.sh** — updated to `git reset --hard origin/main` before rebuilding and restarting, then reloads nginx. **DNS needed**: A record `the-nexus.alexanderwhitestone.com → <VPS_IP>`, then `certbot certonly --nginx -d the-nexus.alexanderwhitestone.com`.
Timmy closed this issue 2026-03-24 04:35:56 +00:00
Member

PR ready: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/217

nginx.conf — serves the-nexus.alexanderwhitestone.com via proxy to the nexus-main Docker container (port 4200):

  • HTTP → HTTPS redirect with ACME challenge passthrough
  • TLS via Let's Encrypt (Certbot), TLS 1.2/1.3
  • HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy headers
  • Gzip compression (JS, CSS, JSON, WASM, SVG, fonts)
  • WebSocket proxy for /ws127.0.0.1:8080 (24h timeout)
  • Long-lived cache (1 year, immutable) for JS/CSS/fonts/images
  • index.html always revalidated (no-cache)
  • DNS setup and install steps documented in header comments

deploy.sh — updated to git pull latest main, rebuild Docker container, and reload nginx (sudo nginx -t && sudo systemctl reload nginx). Supports main (default) and staging modes.

PR ready: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/217 **nginx.conf** — serves `the-nexus.alexanderwhitestone.com` via proxy to the nexus-main Docker container (port 4200): - HTTP → HTTPS redirect with ACME challenge passthrough - TLS via Let's Encrypt (Certbot), TLS 1.2/1.3 - HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy headers - Gzip compression (JS, CSS, JSON, WASM, SVG, fonts) - WebSocket proxy for `/ws` → `127.0.0.1:8080` (24h timeout) - Long-lived cache (1 year, immutable) for JS/CSS/fonts/images - `index.html` always revalidated (no-cache) - DNS setup and install steps documented in header comments **deploy.sh** — updated to git pull latest main, rebuild Docker container, and reload nginx (`sudo nginx -t && sudo systemctl reload nginx`). Supports `main` (default) and `staging` modes.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#211