Running Apache in 32-bit mode on OS X
By default, Mac OS X runs Apache in 64-bit mode. Unfortunately, there are a handful of apache mods that are only available as 32-bit downloads and they can be a bit challenging to modify and recompile in 64-bit unless you are confident with the compiler.
Mod_python is one of those mods - and it also happens to be something that I rely on for my development environment on the Mac. The following is the command to change from 64-bit to 32-bit:
sudo mv /usr/sbin/httpd /usr/sbin/httpd.bkp sudo lipo -thin i386 /usr/sbin/httpd.bkp -output /usr/sbin/httpd.i386 sudo ln -s /usr/sbin/httpd.i386 /usr/sbin/httpd
Unfortunately, I have noticed that Apache goes back to 64-bit mode each time I run a system update. It probably restores the original httpd file. It might go away if you use the actual file and not the sym-link, but I just run the command again.
Use this command if you want to revert back to 64-bit:
sudo mv /usr/sbin/httpd.bkp /usr/sbin/httpd
July 20th, 2009 at 7:17 am
I tried this but httpd would not start afterwards.
January 4th, 2010 at 2:21 pm
[...] able to run in 64-bit, I was running Apache in 32-bit mode under my Leopard install. This is because the ODBC drivers I was running from Actual Technologies [...]
February 10th, 2010 at 9:52 pm
Thank you so much! Worked like a charm.