The mono package itself is not compiled for 64 bit. Perhaps I should have fully read the install guide but here is the main bit of concern:

32 and 64 bit support

The Mono packages published on this web site provide a 32-bit Mono VM.

Support for 64-bit VMs as of Mono 2.10 is only available if you build Mono from source code and install your own copy of the VM. In the future we will ship both mono and mono64 binaries for our users.

The 64 bit support has a few limitations today which is why we have not entirely switched to it:

Our Windows.Forms implementation uses Carbon, and as such, it would not work with a 64-bit Mono.
MonoDevelop uses Carbon for its menu integration so it would not run on a 64-bit VM.
MonoMac bindings have not been ported to 64 bits.
Supporting 64-bit Mono across the board would also require us to ship a 64-bit Gtk+ stack and that would increase the download size for most users.

I attempted to recompile mod_mono in i386 so that it can run with the mono runtime

Am I going to be able to run mod_mono on apache without compiling and installing a 64 bit version of mono? I guess I could do it side-by-side, but this whole process has been very very time consuming.. I'm not sure about maintaining the official package, and a different version just for a test webserver.

Here is the exact terminal output for the latest recompilation of mod_mono:

2 Answers
2

Here is what I did to set up mono/mod_mono on OSX 10.7, Apache2 - hopefully it saves someone else a few steps.

Note that I used a separate install of apache2. Your mileage may vary, but I have found pieces of installs here and there that are aggregated here as of Jul 2012 ... By configuring mod_mono.conf as I have, I now have an apache2/mono install that works, with an apache2 install that is standard from apache.org. While I am an Apple fan boy, I wish the OSX Apache installations were in a little more standard form.

(1) Set up Apache2 on OSX or use the default implementation as per your preference. If you build the httpd engine yourself, see commentary below.
(2) Get mod_mono source, and compile as shown below.
(3) Configure Apache's httpd.conf to include mod_mono.conf.
(4) Edit the mod_mono.conf to fit your needs.
(5) Restart Apache2.

When building apache2 to be placed at /usr/local/apache2:
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-mods-shared=all --enable-module=so --enable-authz-host

When building mod_mono to find apache2 at /usr/local/apache2:
./configure --prefix=/usr/local

When configuring mod_mono on OSX 10.7 assuming that mono is accessible through /usr/bin as with a macports mono install:

I finally got mono working a while ago but never updated here. The problem was mod_wsgi and mod_mono working in tandem. Using a separate apache install will (should) fix the problems I was having.
– Josh SmeatonJul 12 '12 at 4:19

So, I have exactly the same output as you, and as you can see you must use a 64-bit mod_mono in order to run ASP.NET pages under 64-bit Apache with a 32-bit Mono VM.

I think you should try again from the beginning:

download the latest Mono VM (I suggest you to take version 2.10.8, not 2.10.8.1 as this one is not considered stable)

uninstall all previous versions of Mono by running in command line the script uninstallMono.sh located in the MonoFramework-MRE-2.10.8_3.macos10.xamarin.x86.pkg bundle, under the directory Contents/Resources

extract the content of the archive where you want and compile it with the following commands (as you can see I don't provide any argument to the commands):

./configure
make
sudo make install

ensure that you have the following line at the end of your /etc/apache2/httpd.conf file : Include /private/etc/apache2/mod_mono.conf

restart Apache server with the following command: sudo apachectl restart

This should work! If it's not the case, please post the output of mod_mono compilation to see if any error occurred. And also your httpd.conf file: the problem may be related to another Apache module that conflicts with mod_mono.

I suggest to use my own version of mod_mono.conf file, because it enables the AutoHosting feature (just replace the MonoSetEnv LANG=fr_FR.UTF-8 line with your current culture, like "en-US.UTF-8" or "ja-JP.UTF-8").

Closer! Not getting mach-o error anymore, just a SIGTERM when I try to start apache with the mod_mono config loaded.
– Josh SmeatonJan 13 '12 at 3:31

Your commands have exactly the same output as mines, so the compilation of mod_mono went fine. Perhaps you can do what it's suggested in the "make install" output: warning: remember to run libtool --finish /usr/local/lib. It was not required on my system, so I doubt it solves your problem (only the man pages of mod_mono are installed in /usr/local). Could you post your "httpd.conf" file to see what's different from mine? Another question about your system: is it a fresh install of Lion, or an upgrade from Snow Leopard?
– CedXJan 13 '12 at 15:28