[afnog] Scalable, Performance-Critical Web Application Architecture

Brian Candler B.Candler at pobox.com
Thu Sep 2 12:12:00 EAT 2004

FYI, here's how to make it FastCGI work (using FreeBSD ports):

(1) build apache and mod_fastcgi

# cd /usr/ports/www/mod_fastcgi
# make all install

(2) edit httpd.conf and add:

    ScriptAlias /fcgi-bin/ "/usr/local/www/fcgi-bin/"

    <Directory "/usr/local/www/fcgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
        SetHandler fastcgi-script

and start or restart Apache, of course; these days you need
apache_enable="YES" in /etc/rc.conf before doing
/usr/local/etc/rc.d/apache start

(3) make the directory where mod_fastcgi creates sockets for talking to
application processes

# mkdir -p /usr/local/logs/fastcgi/dynamic
# chown www:www /usr/local/logs/fastcgi/dynamic 

(4) create directory /usr/local/www/fcgi-bin, copy testfcgi.rb there, and
point browser at

(If you actually want to use my ruby program then you'll need to install
ports lang/ruby18 and www/ruby-fcgi as well - or else write a test program
using the Perl or C APIs)



More information about the afnog mailing list