[Mono-devel-list] PATCH: XSP/mod_mono virtual hosts + advanced configuration

Jaroslaw Kowalski jaak at zd.com.pl
Thu May 6 15:54:02 EDT 2004

Hi guys!

Some time ago I posted a patch that adds virtual hosts support to
mod-mono-server and xsp. This (among others) makes it possible to run
multiple applications stored in root "/" vpath (useful in hosting

In the meantime I improved configuration methods which now allow for easier
management. You can now store your application definitions in XML files
which will be loaded at XSP/mod-mono-server.exe startup. I also fixed some
issue that prevented the patch from running on current CVS.

New patch version is attached.


Below is a quick and dirty guide for running multiple ASP.NET virtual hosts
with mod_mono:

1. Configure apache to handle each virtual host (see the httpd manual for

2. Prepare one or more XML descriptor files like this and save them in some
folder with an extension '.webapp':


Note that you can put multiple <web-application> tags in a single '.webapp'
file by adding a common root.

3. Once you have the file(s) in the folder, run:

$ mono mod-mono-server.exe --verbose --appconfigdir /path/to/folder

You should see something similar to:

Adding applications from *.webapp files in directory
Adding applications from config file '/home/mono/applications/ma.webapp'
Registering application:
    Host:          ma.zzz.net
    Port:          any
    Virtual path:  /
    Physical path: /home/mono/zzz/html
Adding applications from config file '/home/mono/applications/root.webapp'
Registering application:
    Host:          any
    Port:          any
    Virtual path:  /
    Physical path: /home/mono/public_html/html

Which verifies you that the applications are configured correctly.

4. Connect to your vhost using your favourite browser and check if it's
running ok.

You may want to try various configuration methods. Available are:

- command line (same as today, except that it adds
[vhost:[vport:]]vpath:path support.
- single configuration file
- configuration directory (all '*.webapp' files in this directory are read
at startup)

Run "mod-mono-server.exe --help" for more information.

NOTE: Everything has been tested with 'mod_mono' on Fedora Core 1 and may or
may not work with XSP and/or other configurations. Some features aren't
supported yet (port-based virtual hosts) but they are not so common and I
have no idea how to get the necessary port information.

I'm awaiting your opinion.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vhosts.patch
Type: application/octet-stream
Size: 15317 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040506/97e9c3ec/attachment.obj 

More information about the Mono-devel-list mailing list