Running Apache in 32-bit mode on OS X
Thursday, January 8th, 2009By 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