Recital

Login Register

HOWTO: Install Apache on Mac OS X

Mac OS X leopard supports Universal Binaries so executables and dynamic libraries can be run on multiple architectures. A good example of this is the default apache install on Mac OS X. 
In order to compile apache modules for this architecture you must use the following flags when configuring the apache install.
 ./configure CFLAGS='-arch x86_64' APXSLDFLAGS='-arch x86_64' --with-apxs=/usr/sbin/apxs
Then you must pass the these additional flags to the apxs command in order to generate a Universal Binary shared module.
-Wl,-dynamic -Wl,'-arch ppc' -Wl,'-arch ppc64' -Wl,'-arch i386' -Wl,'-arch x86_64' 
-Wc,-dynamic -Wc,'-arch ppc' -Wc,'-arch ppc64' -Wc,'-arch i386' -Wc,'-arch x86_64' 
If you then do a file command on the shared module it should return; 
$ file mod_recital.so 
mod_recital2.2.so: Mach-O universal binary with 4 architectures 
mod_recital2.2.so (for architecture ppc7400): Mach-O bundle ppc 
mod_recital2.2.so (for architecture ppc64): Mach-O 64-bit bundle ppc64 
mod_recital2.2.so (for architecture i386): Mach-O bundle i386 
mod_recital2.2.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
The apache module files are stored in the /usr/libexec/apache2/ directory on a default apache install on the Mac and the configuration file is /private/etc/apache2/httpd.conf
Twitter

Copyright © 2024 Recital Software Inc.

Login

Register

User Registration
or Cancel