mod_mono.conf howto

I have always use this configuration for my vhost and it works great
in my Solaris mod_mono installation

1) I have renamed mod_mono.conf to mod_mono_edison.conf (edison being
my hostname), you can always use a different name. I do this to avoid
my custom conf being overwritten if I upgrade my mod_mono package

2) Include mod_mono_edison.conf in my httpd.conf (or your apache.conf)

Include /path/to/mod_mono_edison.conf

3) Add MonoApplicationsConfigDir “/path/to/your/mod-mono-config-dir”
to mod_mono_edison.conf

MonoApplicationsConfigDir “/path/to/your/mod-mono-config-dir”

4) Create <appname>.webapp inside the mod-mono-config-dir for every
vhost webapp:

example.webapp

<web-application>
<name>example</name>
<vpath>/</vpath>
<path>/path/to/example.com</path>
<vhost>www.example.com</vhost>
</web-application>

example2.webapp

<web-application>
<name>example2</name>
<vpath>/</vpath>
<path>/path/to/example.com</path>
<vhost>example.com</vhost>
</web-application>

5) In virtual-host.conf, add

<Directory “/path/to/example.com”>
     SetHandler mono
</Directory>

I think this approach is more flexible since I can just add another
<appname>.webapp in my mod-mono-config-dir, add vhost entry and
restart apache and it will be picked up.