Created
November 29, 2012 23:25
-
-
Save pmanijak/4172623 to your computer and use it in GitHub Desktop.
Installing mod_mono on OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is one way to get mod_mono up with OS X (Lion), for experienced computer users, | |
but inexperienced Apache users. Note, this is just if you're trying to get one project | |
up and running quickly: | |
1. Apache is already installed. Don't worry about it. | |
2. Get mono for OS X: http://www.go-mono.com/mono-downloads/ (the SDK) | |
3. Get the latest source for mono_mod: http://download.mono-project.com/sources/mod_mono/ | |
Extract the tar ball, go into the folder, and do this: | |
$ ./configure prefix=/Library/Frameworks/Mono.framework/Versions/2.10.9 --with-apxs=/usr/sbin/apxs --with-apr-config=/usr/bin/apr-1-config | |
Note, you might need to change the "2.10.9" version. | |
$ make | |
$ sudo make install | |
-- | |
Turn on Web Sharing: http://support.apple.com/kb/HT3323 | |
Edit your /etc/apache2/httpd.conf file: | |
#Replace: DocumentRoot "/Library/WebServer/Documents" With: | |
DocumentRoot "/path/to/project" | |
#Replace: <Directory "/Library/WebServer/Documents"> With: | |
<Directory "/path/to/project"> | |
#Add: | |
LoadModule mono_module /usr/libexec/apache2/mod_mono.so | |
Include /etc/apache2/mod_mono.conf | |
MonoAutoApplication disabled | |
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd | |
MonoApplications "/:/path/to/project" | |
#If you want SSI: | |
AddOutputFilter INCLUDES .aspx | |
#And add the following to the options line inside <Directory "/path/to/project"> | |
Options +Includes | |
#This allows you to do things like: | |
<!--#include virtual = "/inc/whatever.aspx" --> | |
#and whatever.aspx can have code in it. Note, the default language is C#, | |
#so you'll need a @ Page directive if you're using VB, or edit your web.config. | |
-- | |
To see if you made any typos: | |
$ sudo apachectl configtest | |
-- | |
Now you'll have your '/path/to/project' running at http://localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment