[Mono-osx] Getting Mono to work with Apache in Mac OS X Leopard
eto
curtis.wensley at gmail.com
Fri Jul 24 11:02:13 EDT 2009
I've been using mod_mono sweetness on OSX using the built-in apache server
for over a year now. I really wish they'd just compile mod_mono with the
osx binaries.. I've tried to get fastcgi working to no avail.. though I
hear that fastcgi doesn't work well on apache even on linux.. *shrug*
There's many issues getting a mod_mono running with the built-in os x apache
server in leopard. First, leopard has 64-bit apache where the mono binaries
are 32-bit. Second, is that the latest mod_mono now requires glib, where it
did not before (My working copy of mod_mono was woefully out of date but I
was happy).
Anyway, after much trials and tribulations, I've been able to build &
install the latest mod_mono and use the packaged 2.4.2.2 mono .dmg's (for
easy upgrades) using these steps:
1) Ensure you have the standard mono os x binaries installed (I am currently
using 2.4.2.2)
1) Install MacPorts
2) Edit /opt/local/etc/macports/macports.conf and add (or change) this line
to:
universal_archs i386 x86_64
Note: If you already have macports installed without this, you'll have to
re-install all related ports.
3) Edit /opt/local/etc/macports/variants.conf and add:
+universal
2) Install glib2 and libtool in MacPorts:
sudo port install glib2 libtool
4) download (latest) mod_mono source or check out from svn
5) modify src/mod_mono.c and comment out this line (if it exists) as it
borks on leopard:
// sigaddset (&sigset, SIGPWR);
6) Then time to build & install mod_mono:
PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" CFLAGS="-m64" ./configure
--prefix=/Library/Frameworks/Mono.framework/Versions/Current
make
sudo make install
7) add these lines to your /etc/apache2/httpd.conf:
Include /etc/apache2/mod_mono.conf
MonoServerPath
/Library/Frameworks/Mono.framework/Versions/Current/bin/mod-mono-server2
c'est voila!
wharrell wrote:
>
> Okay, I'm not sure if mono is even capable of doing this or not but I'm
> going to ask. I've work with PHP for awhile and I'm spoiled. OS X comes
> with PHP pre-installed all you have to do is turn it on. I need to learn
> ASP.NET so I have to get this running now. I've tried working with these
> instructions,
>
> http://mono-project.com/Mod_mono
>
> but after download packages and trying to configure each of them they
> always say I'm missing a variety of different things and it seemingly is
> just spinning in circles. SO, HELP!!!!
>
> If anyone can provide me with a step-by-step instructional to install and
> run mono on my mac so that I can begin testing my .aspx pages I would much
> appreciate it.
> Thanks
>
--
View this message in context: http://www.nabble.com/Getting-Mono-to-work-with-Apache-in-Mac-OS-X-Leopard-tp24629121p24646201.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list