Hosting Several Go sites on one VPS


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 thing upload, config and monitor.

By using Cloudflare in front as an extra proxy you can add serveral cool stuffs. Amongst other 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 executeable you make it simpler to restart Go. Both manually and automatically.

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