FastCGI on MacOS X(Tiger)
id:Gemma:20070405に追いつくためにFastCGIをインストール。
mod_fcgi
まずは、FastCGIをインストール。
http://www.fastcgi.com/から、http://www.fastcgi.com/dist/fcgi.tar.gzをダウンロードしてコンパイルする。
$ wget fastcgi.com/dist/fcgi-2.4.0.tar.gz $ tar xvzf fcgi-2.4.0.tar.gz $ cd fcgi-2.4.0 $ ./configure $ make $ sudo make install
次は、mod_fcgiをインストール。これは、もうMacOS X用バイナリがあるらしいのでそれを利用することにする。Intel Macだと使えないのかな?
$ wget http://andreas-s.net/download/mod_fastcgi-panther-2.4.2.tar.gz $ tar xvzf mod_fastcgi-panther-2.4.2.tar.gz $ cd mod_fastcgi-panther-2.4.2 $ sudo cp mod_fastcgi.so /usr/libexec/httpd/ $ sudo chmod 755 /usr/libexec/httpd/mod_fastcgi.so
そして、設定ファイルにいろいろ追加。
LoadModule fastcgi_module libexec/httpd/mod_fastcgi.so AddModule mod_fastcgi.c <IfModule mod_fastcgi.c> FastCgiIpcDir /tmp/fcgi_ipc/ AddHandler fastcgi-script .fcgi </IfModule>
個人用ページ(http://localhost/~mzp等)で動かしたい場合は、/etc/httpd/users/mzp.confに
FastCgiIpcDir /tmp/fcgi_ipc/
を追加しておく必要がある。