golang-apache-fastcgi
golang-apache-fastcgi copied to clipboard
Learning project to deploy a go binary in shared hosting environment.
Go + Apache + FastCGI = Go for Shared Hosting
Learning project to deploy a Go binary as FastCGI script on an Apache http server.
Examples
-
Vanilla
- Starting point to make any go binary FastCGI compatible.
-
Beego
- Using the Beego framework right now requires this pull-request astaxie/beego#858.
Getting Started
Please make sure you have Go and Beego installed. Then just do:
$ make
Then open your browser:
$ open http://localhost
When you are using docker-osx:
$ open http://localdocker
Why Apache HTTP?
The primary focus of this project is to demo the use of Go binaries in a shared hosting environment.
Also on web servers like Nginx there are seperate start/stop scripts required to spawn FastCGI processes.
Performance
Thanks / References
- http://www.dav-muz.net/blog/2013/09/how-to-use-go-and-fastcgi/
- http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
- http://golang.org/pkg/net/http/
License
See LICENSE.