Hello World (I'm new here)
I'm developing a simple web application using yesod, deploying it to apache2+cgi (that is, old school cgi)

I first got my project working on  my dev box using fastcgi but couldn't get it to work on my shared host, and it's harder to debug than cgi, so I thought I may just stick to cgi until I find a better host. The problem now is that I just can't get cgi to work on my local machine.

I read on yesod's docs that the simple-server is smart enough to know when to run stand-alone or CGI, so I compiled that:
$ ghc --make simple-server.hs

But when I visit the url it just hangs there, and re-visiting throws a 500 error, and my apache log shows this:
[Wed Oct 20 18:37:56 2010] [error] [client 127.0.0.1] malformed header from script. Bad header=Loaded: server.cgi
[Wed Oct 20 18:37:56 2010] [error] [client 127.0.0.1] server.cgi:
[Wed Oct 20 18:37:56 2010] [error] [client 127.0.0.1] bind: resource busy (Address already in use)

I'm guessing, simple-server is launching a stand alone server the first time instead of handling the request as a CGI one.

Am I using the right handler? Is there anything I should set in the environment to let simple-server know how to handle those requests?

Then I have some other questions, after compiling, I need to move the binary file and the cassius, hamlet, julius and public directories to my web dir, then I need to set the permissions on public/tmp so yesod can write to them. I made a shellscript that does all that for me, but seems like the kind of thing that everyone must be solving their own way by now so I wanted to see if anyone had done anything better about compiling/packaging and didn't mind sharing :)

That's all for now, thanks in advance for your help.

cheers
----nubis :)