Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
OK, agree this is a SF question. I'm voting to move it there. –  GeneQ Aug 18 '10 at 11:44
add comment

migrated from stackoverflow.com Aug 20 '10 at 0:10

This question came from our site for professional and enthusiast programmers.

1 Answer

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

share|improve this answer
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 '10 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 '10 at 0:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.