Serve the Nexus from the VPS — nginx config for the-nexus.alexanderwhitestone.com #211
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/217
nginx.conf — serves
the-nexus.alexanderwhitestone.comwith HTTP→HTTPS redirect, TLS (Let's Encrypt), gzip, long-lived cache headers for hashed assets,no-cacheonindex.html, and/wsWebSocket proxy tolocalhost:8080. Static traffic proxies to the nexus-main Docker container on port 4200.deploy.sh — updated to
git reset --hard origin/mainbefore rebuilding and restarting, then reloads nginx.DNS needed: A record
the-nexus.alexanderwhitestone.com → <VPS_IP>, thencertbot certonly --nginx -d the-nexus.alexanderwhitestone.com.PR ready: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/217
nginx.conf — serves
the-nexus.alexanderwhitestone.comvia proxy to the nexus-main Docker container (port 4200):/ws→127.0.0.1:8080(24h timeout)index.htmlalways revalidated (no-cache)deploy.sh — updated to git pull latest main, rebuild Docker container, and reload nginx (
sudo nginx -t && sudo systemctl reload nginx). Supportsmain(default) andstagingmodes.