2

I want to serve a FastCGI based Perl script using Snow Leopard's built-in Apache server (2.2.14 apparently).

I've heard something called MacPorts is required; which is some sort of 'apt'-like package manager for Macs.

Previously, I've configured FastCGI for Apache on Debian and Fedora.

What's the difference between configuring FastCGI for Apache in Linux versus OS X?

Are there any gotchas I need to be aware of before I begin?

Thanks.

1
  • 1
    OK, agree this is a SF question. I'm voting to move it there.
    – GeneQ
    Aug 18, 2010 at 11:44

1 Answer 1

1

Install MacPorts (it's free), go to a Terminal window and type

sudo port install mod_fastcgi

To enable it:

echo LoadModule fastcgi_module modules/mod_fastcgi.so | sudo tee -a /opt/local/apache2/conf/httpd.conf

Note this will build and install its own version of Apache. To switch from the default Apache install, go to System Preferences -> Sharing and uncheck Web Sharing, then in Terminal

sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist

You can figure most of this out from the output that "port" gives you. To find more Apache modules try

port search apache

2
  • 1
    I strongly recommend leaving the system Perl alone and installing a new perl (Macports has bundles for 5.8.9, 5.10.1 and 5.12.1, or you can always build your own from source) to use with FastCGI. Subsequent updates from Apple could tread on your system Perl install, and (I speak from experience) it can all end in tears. It's much better to perform your customizations on a separate build that you control (and if you screw up something, you can always wipe it all and start over without fear).
    – Ether
    Aug 18, 2010 at 16:19
  • Yeah, Apple specific directories such as /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level give me goosebumps. Took a while to realize their prupose.
    – GeneQ
    Aug 20, 2010 at 0:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .