FAQ
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:

http://play.golang.org/p/ipoTzL7PWR

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

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Xz1 at Sep 15, 2013 at 12:09 am
    Maybe get it to listen on a HTTP port (on127.0.0.1) and use mod_rewrite to
    proxy to it.
    On Saturday, September 14, 2013 5:15:40 PM UTC-4, Stephen Gutekanst wrote:

    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:

    http://play.golang.org/p/ipoTzL7PWR

    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
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Sep 15, 2013 at 12:23 am
    Who uses FCGI these days? You'll find the path much better trodden if you use HTTP reverse proxying.


    On 15/09/2013, at 7:52, xz1@sliceone.com wrote:

    Maybe get it to listen on a HTTP port (on127.0.0.1) and use mod_rewrite to proxy to it.
    On Saturday, September 14, 2013 5:15:40 PM UTC-4, Stephen Gutekanst wrote:

    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:

    http://play.golang.org/p/ipoTzL7PWR

    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
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Stephen Gutekanst at Sep 15, 2013 at 12:38 am
    Thank you guys for the tips on using mod_rewrite or mod_proxy!

    That makes things quite a lot simpler!

    Thank you again,
    Stephen
    On Saturday, September 14, 2013 5:23:03 PM UTC-7, Dave Cheney wrote:

    Who uses FCGI these days? You'll find the path much better trodden if you
    use HTTP reverse proxying.



    On 15/09/2013, at 7:52, x...@sliceone.com <javascript:> wrote:

    Maybe get it to listen on a HTTP port (on127.0.0.1) and use mod_rewrite to
    proxy to it.
    On Saturday, September 14, 2013 5:15:40 PM UTC-4, Stephen Gutekanst wrote:

    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:

    http://play.golang.org/p/ipoTzL7PWR

    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
    --
    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 <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 14, '13 at 9:15p
activeSep 15, '13 at 12:38a
posts4
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase