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

Gonzalo Paniagua Javier gonzalo at ximian.com
Fri May 7 14:06:02 EDT 2004


El jue, 06-05-2004 a las 21:54, Jaroslaw Kowalski escribió:
> 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
> environments).

I didn't include those changes in latest release because mod_mono wasn't
working with them.

> 
> 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.

You rule, dude :)

> 
> New patch version is attached.
> 
> RUNNING MOD_MONO:
> 
> 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
> instructions)
> 
> 2. Prepare one or more XML descriptor files like this and save them in some
> folder with an extension '.webapp':
> 
> --------------------------
> <web-application>
>         <name>Root</name>
>         <vpath>/</vpath>
>         <path>/home/mono/public_html/html</path>
>         <vhost>my.host.name</vhost>
>         <vport>8888</vport>
> </web-application>
> --------------------------
> 
> 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
> '/home/mono/applications'
> 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.

This really rocks! I need to do more testing, but this is likely going
to get into CVS soon.

Thank you very much.

-Gonzalo





More information about the Mono-devel-list mailing list