Friday 28 November 2008

Apache, Mono and Virtual Hosts

I run some ASP.Net applications under mono on a Debian host. Mono has come a long way in the last few years and is now making progress in support for C# 3.0 and even WCF. This adds appeal to the platform and increases the scope of it's usefullness.


One thing I had trouble finding documentation for and ended up accomplishing through trial and error was setting up my Mono applications to run in an Apache (2) Virtual Host. The most difficult bit turned out to be the configuration of my sites-available file in /etc/apache2/sites-available. So I've decided to share it here:


<VirtualHost *>
ServerName example.com
ServerAlias www.example.com example.net www.example.net example.co.uk www.example.co.uk
DocumentRoot /var/www/example.com
ServerAdmin serveradmin@example.com
ErrorLog /var/log/apache2/example.com-error_log
#RewriteEngine on
#RewriteRule ^/([A-Za-z]*)/?$ /?Page=$1 [PT]
AddMonoApplications example "/:/var/www/example.com"
MonoUnixSocket example /tmp/.example_mod_mono_server2
MonoServerPath example /usr/lib/mono/2.0/mod-mono-server2.exe
AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx .svc
MonoApplicationsConfigDir example /etc/mono-server2
MonoPath example /usr/lib/mono/2.0:/usr/lib:/usr/lib/mono/2.0
<Directory "/var/www/example.com">
MonoSetServerAlias example
SetHandler mono
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

As you can see, I have commented out the RewriteEngine and RewriteRule directives but there is enough there for you to see what new tricks we .Net devs have to play with when we write code for a Mono deployment...

Thursday 13 November 2008

Help find Philip McNeil

The last few days have been an emotional roller coaster. We heard on Monday that Jo's brother has not been heard from or seen since early October when he disappeared from Yellowknife.

There are good indications that he is alive but piecing together the facts from an overwhelmingly large selection of tiny clues has been exhausting.

I have learned so much this week about human nature that my head feels like it's going to explode. Listening to second and third hand reports is useful but you can't beat going straight to the source to get the facts. It seems that when someone relates an incident or a conversation to you, they can't help but include their own interpretation or understanding of an event and when the relay has already passed through more than one chinese whisper the facts can get seriously twisted.

The whole week has been spent speaking to everyone we can find who has spoken to or seen Phil in the weeks leading up to his disapearance and organising the effort to find him.

We put up a simple website to colate some of the information gathered so far at: www.philipmcneil.com.

Jo left for Yellowknife this morning. She's due to meet up with Julie when she arrives and start interviewing people face to face as well as recruiting a team to help her search for Phil.

I love you Jo. Good luck! Find him quickly.