I've been considering porting my CMS from mod_perl to Go, but I'm not sure how you work with the other files (CSS et al). I did read somewhere that you run Go from Apache but it's not recommended.
I've been considering porting my CMS from mod_perl to Go, but I'm not sure how you work with the other files (CSS et al). I did read somewhere that you run Go from Apache but it's not recommended.
For hosting CSS, you either generate it programmatically and send the right Header, or you can use http.FileServe from the standard library [1]. (Surely other approaches are possible, but those are the two I've played with so far.)
The issue I have is that I would prefer to keep Apache around if I can (I have a few sites - some of which I host for friends). While my web server does have a few IPs attached, I'd rather not have to buy more IPs just to separate Apache from Go.
And to be perfectly honest, I do quite like Apache. (each to their own I know, but I've had little reason to complain about it).
I used to run Apache solo.
Now I run Nginx, which forwards requests to Apache or to my various go apps based on the domain name. Apache and the go apps just listen on different ports internally. The server only has 1 IP address.
Thank you
Here's an example of one I use to run my own `godoc` server:
<VirtualHost *:80>
ServerAdmin admin@burntsushi.net
ServerName godoc.burntsushi.net
ProxyPreserveHost On
ProxyPass / http://burntsushi.net:8080/
ProxyPassReverse / http://burntsushi.net:8080/
</VirtualHost>I might try that before dipping my toes into Nginx
If I had it to do over again I would still use Go's web server, as it seems to work great. My site can conservatively handle 1 million page views hourly, using a cheap box.
[1] https://groups.google.com/forum/?fromgroups=#!topic/golang-n...