OK, so you want to run FastCGI on OS/X 10.5, how does that work? If you've just followed the directions and used your usual UNIX skillz, you'll have dead-ended on this odd error:
httpd: Syntax error on line 115 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_fastcgi.so into server: dlopen(/usr/libexec/apache2/mod_fastcgi.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_fastcgi.so: mach-o, but wrong architectureThis is the architecture of your DSO not matching the x86_64 architecture of the build shipped with OS/X. So we must build with the correct flags in place.
Here's the steps from scratch.
curl http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz > mod_fastcgi-2.4.6.tar.gzNow edit
tar xvfz mod_fastcgi-2.4.6.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
Makefile and change top_dir to /usr/share/httpd and add a line CGLAGS=-arch x86_64.makeNow edit
cp .lib/mod_fastcgi.so /usr/libexec/apache2
/private/etc/apache2/httpd.conf and add a line LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so. Run apachectl restart and you are now loaded. You'll need to enable FastCGI for your applications as described in the documentation.
6 comments:
I haven't tested it, but you could have used darwinports to build from source: http://mod_fastcgi.darwinports.com/
True, but they I'd have to give up my Apple-installed Apache for the one from ports. My fanboi heart wouldn't allow it :)
cp .lib/mod_fastcgi.so /usr/libexec/apache2
results in no such file or directory. All the above has been executed. In which directory should the file reside? The are a .o and a .slo though in the mod_fastcgi dir.
willard
$ sudo cp .libs/mod_fastcgi.so /usr/libexec/apache2
works for me mentalhome, so try changing .lib to .libs
Paul, thanks for the writeup!
Should be:
CFLAGS = -arch x86_64
not
CGLAGS=-arch x86_64
Hey Paul, take a few minutes to implement dane's changes, would save a little time. Thanks for the post btw.
Post a Comment