I'm using mod-mono for deploying an asp.net mvc application on Ubuntu Server 10.04. The following packages were installed: mono-apache-server4 libapache2-mod-mono apache2
.
There are several blogs that configure mod-mono virtual hosts via the sites-available Apache configuration. For example, I could modify /etc/apache2/sites-available/default
configuration like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
MonoApplications "/:/var/www"
MonoServerPath /usr/bin/mod-mono-server4
... more default configuration
But then there are also sites that advise to use an webapp file for mod-mono virtual host configuration. For example, I could modify /etc/mono-server4/debian.webapp
like this:
<apps>
<web-application>
<name>default</name>
<vpath>/</vpath>
<path>/var/www/</path>
<vhost>127.0.0.1</vhost>
</web-application>
</apps>
Both approaches however need an apache site SetHandler mono
configuration setting.
The only difference I noticed is that for sites configuration I have to explicitly define mod-mono-server4 (otherwise the system is trying to start a server2 instance which is not installed). When configured via sites configuration it also seems that there is an additional mono_server process spawned.
I guess I should go with the webapp option, but are there any "big" differences between this two approaches? Is webapp configuration distribution specific or why are there two options anyway?