Home

Hosting Several Go sites on one VPS

Cloud

Hosting MANY Go executables is different from hosting PHP or similar. You have to set the Go to listen to different ports. And then tell Nginx proxy (redirect) which Go executable to open. This mini tutorial guides you how to set up a VPS and create a "Go Hosting".

Webmin is a tool to manage the entire VPS Host. Amongst other things, upload, config and monitor.

By using Cloudflare in front as an extra proxy you can add several cool things. Amongst others can Cloudflare handle the SSL certificate for your entire server if you want. The sites are cached automatically and if you want Cloudflare can compress your code for faster rendering.

When adding systemd support to each Go executable you make it simpler to restart Go. Both manually and automatically.

If you host only ONE Go executable, there is no need for Nginx. Just use port 80 and 443 as usual.