[Mono-list] MonoDocumentRootDir for virtual hosts / dll library

Chris Aitken chris@ion-dreams.com
Thu, 20 Jan 2005 10:59:53 -0000


Hi All,

I have mod-mono-server running successfully with virtual hosts (Debian
sarge).

I have the following mono packages installed from the debian repository:

ii  libmono-dev    1.0.4-1        libraries for the Mono interpreter -
Develop
ii  libmono0       1.0.4-1        libraries for the Mono interpreter
ii  mono           1.0.4-1        The Mono .NET development environment
ii  mono-assemblie 1.0.4-1        architecture specific files for Mono/.NET
as
ii  mono-assemblie 1.0.4-1        the Mono .NET class libraries
ii  mono-common    1.0.4-1        common files for the Mono CLI runtimes
ii  mono-gac       1.0.4-1        Mono GAC Tool
ii  mono-jit       1.0.4-1        fast CLI (.NET/Mono) JIT compiler
ii  mono-mcs       1.0.4-1        the Mono C# compiler
ii  mono-utils     1.0.4-1        Mono utilities

And mod_mono & xsp from the FC2 stable RPM's on the go-mono site (passed
through alien to create a .deb).

In /etc/apache2/sites-available I have 2 virtual hosts, mono1 & mono2 (this
is mono1, mono2 has mono2 everywhere). Site roots are
/home/mono1/public_html & /home/mono2/public_html:

<VirtualHost *>
        ServerAdmin webmaster@localhost
        DocumentRoot /home/mono1/public_html
        ServerName mono1.persephone
        DirectoryIndex index.htm index.aspx default.aspx
        Options Indexes FollowSymLinks MultiViews
        <Location />
                SetHandler mono
        </Location>
</VirtualHost>

In /etc/httpd I have a file mod-mono-server.exe.config, which has
/usr/lib/mono/1.0/mod-mono-server.exe.config pointing to it:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
        <appSettings>
                <add key="UnixSocketFileName" value="/tmp/mod_mono_server"
/>
                <add key="MonoApplicationsConfigDir"
value="/etc/mono-httpd/conf.d" />
        </appSettings>
</configuration>

Finally, in /etc/httpd/conf.d I have persephone.webapp:

<apps>
        <web-application>
                <name>mono1</name>
                <vhost>mono1.persephone</vhost>
                <vpath>/</vpath>
                <path>/home/mono1/public_html</path>
        </web-application>
        <web-application>
                <name>mono2</name>
                <vhost>mono2.persephone</vhost>
                <vpath>/</vpath>
                <path>/home/mono2/public_html</path>
        </web-application>
</apps>

Then I run (as user www-data, the apache user) "mono
/usr/lib/mono/1.0/mod-mono-server" Everything is hunky-dory.

So finally to the 2 questions:

What purpose does the MonoDocumentRootDir serve?
Currently, when I start mod-mono-server, it sets the Root Dir to the current
directory. If I have:
   <add key="MonoDocumentRootDir " value="/tmp" />
Then it set the Root Dir as /tmp.

But what is the difference - why would I be bothered about about where the
root dir is?

AND....How does the mod-mono-server know where my global application cache
is? 
Under Debian's original setup, when defining a web-app (with
mono-server-admin.conf), one would define a --lib (which for some reason the
example was set for /usr/share/dotnet/lib - an empty directory).

My libraries are in /usr/share/dotnet/mono/gac. Is there any need to pass
this location (I know I can put dlls into the local application cache ).

Cheers for the patience!

Chris







-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.