[Mono-list] mod_mono and virtual hosts config

Filipe Guedes mail@filipeguedes.com
Fri, 17 Sep 2004 13:37:57 +0100


Hi everybody !

I'm currently trying to configure mod_mono to work with virtual hosts. I 
need to get it working in domain1.com/demo and domain2.com/net, and I'm 
trying to do it using .webapp config files.
Aparently there's something i'm not doing right, as it does not work. 
I've tried to configure it to work only with one of the domains, not 
using .webapp. It worked almost fine: it was possible to access the same 
dir using the other domain (eg.: configure domain1.com/demo and access 
using domain2.com/demo).
I think that I didn't understand how to make proper use of .webapp 
files, and that's why things get messed up.

I'm sendig my config files, hoping that you can help me figure out 
what's wrong.

Regards,

Filipe

#mod_mono.conf (httpd.conf has an include for this)
########################################
LoadModule mono_module modules/libmod_mono.so

Alias /demo "/usr/share/doc/xsp/test"
Alias /net  "/home/httpd/domain2.com/httpdocs/asp"
MonoRunXSP True
MonoApplicationsConfigDir "/etc/mod_mono"

#I'm not sure if I need the following

<Directory /usr/share/doc/xsp/test>
       SetHandler mono
     <IfModule mod_dir.c>
        DirectoryIndex index.aspx
     </IfModule>
</Directory>

<Location /demo>
    SetHandler mono
</Location>

<Directory /home/httpd/vhosts/domain2.com/httpdocs/asp>
        SetHandler mono
        <IfModule mod_dir.c>
            DirectoryIndex index.aspx
        </IfModule>
</Directory>

<Location /net>
    SetHandler mono
</Location>

# /etc/mod_mono/domain1.webapp
###########################
<apps>
     <web-application>
         <name>Demo</name>
         <vhost>domain1.com</vhost>
         <vport>80</vport>
         <vpath>/demo</vpath>
         <path>/usr/share/doc/xsp/test</path>
      </web-application>
</apps>

#/etc/mod_mono/domain2.webapp
###########################
<apps>
     <web-application>
         <name>Net</name>
         <vhost>domain2.com</vhost>
         <vport>80</vport>
         <vpath>/net</vpath>
         <path>/home/httpd/vhosts/domain2.com/httpdocs/asp</path>
      </web-application>
</apps>