FreeBSD / mod_fastcgi

Eventually, I managed to get mod_fastcgi to compile on FreeBSD. See PR#91190. It basically amounted to applying the patch in the mailing list automatically. But what really surprised me were the changes to the port’s Makefile. I trimmed out about 50 lines of confusion into this:

SRC_FILE=    *.c
PORTDOCS=    LICENSE.TERMS mod_fastcgi.html

This is all thanks to the new support. It really works well. However, it is slightly underdocumented. But this isn’t much of a problem. less /usr/ports/www/mod_*/Makefile provided enough hints to get going quickly.

Now I just need to get the maintainer approval, in order to get this committed…



I spent a little while yesterday attempting to work out how to get FastCGI installed. Unfortunately, because I’m using Apache 2.2, this wasn’t straightforward. In fact, I’d pretty much given up. Later on, I found this patch on the fastcgi-devel list, which purports to work (and looks like it will, given my experiences yesterday).

All this is just so that I can sensibly run Typo, a rails app. There are other ways to do it, but they’re less preferrable. I could use plain CGI, but that’s dog-slow. I could set up lighttpd, but I’d rather not, seeing as I’m already running Apache for so many other services. I suppose that I could run the standalone script/server tool and use mod_proxy to connect to it. But I that means that I then have to ensure that the process stays up the whole time and gets started correctly. Overall, FastCGI seems like the best choice.

So, today I’ll have a go at plumbing that patch into the FreeBSD port.