Deploying Go via FastCGI on DreamHost ?

712 views
Skip to first unread message

Stephen Gutekanst

unread,
Sep 14, 2013, 5:15:40 PM9/14/13
to golan...@googlegroups.com
Hi,

I'm restricted to developing an application on a shared DreamHost environment, and I'd really like to use Go for this application.
Using other providers (Google Apps, Amazon, VPS, etc) is not possible (my client has restricted me to DreamHost, I'd like to follow their wishes).

I think I should be able to use the net/http/fcgi package.
But since this is a shared host, I cannot configure Apache to use FastCGI over a specific host / port.

I looked at the net/http/fcgi source, and it looks like I can run it over stdin unix pipes, like so:


But it seems like this code doesn't work, my apache logs say:

[Sat Sep 14 13:50:14 2013] [error] [client 98.167.175.61] Premature end of script headers: dispatch.fcgi

And my .htaccess file looks like:

RewriteEngine On
RewriteBase /
RewriteRule ^dispatch\.fcgi/ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]


I'm not super experienced with configuring Apache for FastCGI or the internals of how FastCGI works.

I would really appreciate any help or tips you can give me.

Thank you,
Stephen

x...@sliceone.com

unread,
Sep 14, 2013, 5:52:01 PM9/14/13
to golan...@googlegroups.com
Maybe get it to listen on a HTTP port (on127.0.0.1) and use mod_rewrite to proxy to it.

Dave Cheney

unread,
Sep 14, 2013, 8:23:03 PM9/14/13
to x...@sliceone.com, golan...@googlegroups.com
Who uses FCGI these days? You'll find the path much better trodden if you use HTTP reverse proxying. 


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Stephen Gutekanst

unread,
Sep 14, 2013, 8:38:55 PM9/14/13
to golan...@googlegroups.com, x...@sliceone.com
Thank you guys for the tips on using mod_rewrite or mod_proxy!

That makes things quite a lot simpler!

Thank you again,
Stephen
Reply all
Reply to author
Forward
0 new messages