Enable Apache first by ticking the checkbox for Web Sharing(System Preferences > Sharing > Web Sharing)
Type 127.0.0.1 in browser's address bar, then it should show:
Install gettext first:
https://gist.github.com/1647940
Install Mono, get it at:
http://www.go-mono.com/mono-downloads/download.html
Verify on Terminal if you have installed Mono...
mono -V
...should show this:
Mono JIT compiler version 2.10.9 (tarball Mon May 7 20:25:51 EDT 2012)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: normal
Notification: kqueue
Architecture: x86
Disabled: none
Misc: debugger softdebug
LLVM: yes(2.9svn-mono)
GC: Included Boehm (with typed GC)
Paste this in your terminal(the next swoop will still have the effect of sudo(i.e. no need to re-enter password)) :
sudo mv /Library/WebServer/Documents/index.html.en /Library/WebServer/Documents/x_index.html.en
And this(so that makes it two swoop
;-)) :
mkdir ~/swoop
cd ~/swoop
sudo ln -s /Library/Frameworks/Mono.framework/Commands/pkg-config /usr/bin/pkg-config
curl -O http://origin-download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2
tar xzf mono-2.10.9.tar.bz2
cd mono-2.10.9
./configure
make
sudo make install
sudo sh -c "echo '\n\nInclude /etc/apache2/mod_mono.conf' >> /etc/apache2/httpd.conf"
echo "<center><img src='PoweredByMacOSXLarge.gif'><br><% int a = 7 * 6;%><%=a%> <%=new System.Random().Next()%></center>" > /Library/WebServer/Documents/index.aspx
sudo /usr/sbin/apachectl restart
echo 'Done'
Then refresh the 127.0.0.1 in your browser, you shall be able to see the
the answer to life, the universe and everything
This is the how-to video ...