ligHTTPD, FastCGI, Apache2, SCGI and Django deployment adventures

I went through a bit of trouble while deploying django with fastcgi recently and I thought I might as well post about my findings, because it might be useful to some people and if I don’t, it will be lost ;)

Apache 2’s fastcgi support is a bit lacking, so I turned to lighttpd. I have used it before and I really liked it. Apart from just having the right feel, I found it quite lightweight and easy to configure. Therefore I really wanted to use it again.

Then I ran into some segfaults. The documentation is not always very clear and therefore it actually gets quite difficult if you do stuff like more complicated rewrite rules.. I added a ticket to trac here.

I then remembered reading about SCGI on FLUP’s page, so I started doing some research on the differences between FastCGI and SCGI. Here are some links I found:

I then did an “apt-cache search apache2 scgi” and found that there is actually a SCGI module for apache2. I was about to try it out when I started closing all the firefox tabs I opened while reading up on SCGI and noticed something mentioning that %x are backreferences to the conditional.. My immediate thought process went something like “Wait a minute. I’m not using a conditional…..” Then I quickly fixed my lighttpd configuration and now it works.

This means I’ll probably never bother trying out SCGI.

Leave a Response

(will not be published)
(optional)

Remember Me