[Mono-list] Question about mod_mono with apache 1.3 and virtual hosts

Juraj Skripsky js at hotfeet.ch
Mon Dec 26 14:38:36 EST 2005


Hi Sebastian,

Take a look at the man page of mod_mono:

MonoSetServerAlias
  Takes a server alias name. This is to be used inside <Directory>
  or <Location>.  Default value: ’default’ if the directive is not
  used.

I haven't used this directive myself yet, but I think this is what you
are looking for. It makes the Alias known to Mono.
Good luck!

- Juraj


PS: Apache is a very patient server, it takes a lot to make him upset...


On Mon, 2005-12-26 at 20:16 +0100, Sebastian Gingter wrote:
> Hello,
> 
> I actually have a bit of a problem of running mod_mono with my apache 1.3 and in virtual hosts.
> 
> I installed and configured mono, and when I use this entry in my httpd.conf:
> 
> Alias /mono "/var/www/mono"
> MonoApplications "/mono:/var/www/mono"
> 
> SetHandler mono
> 
> 
> it simly works there. The problem is: I have many virtual hosts configured and now I can
> access the same web application with www.domain1.com/mono and www.domain2.com/mono etc...
> But I don't want that.
> 
> What I want is to copy different web applications into different vhosts and run them there
> ie. www.domain1.com with /var/www/domain1/index.aspx and
> ie. www.domain2.com with /var/www/domain2/index.php wich runs under php but with the ability
> to call a webform.aspx in the same directory that runs through mono. (I have a php based forum
> and ther should be a seperate frontend for user management written in c# and this should be
> accessed either by a direct call to that aspx or if that won'work at all in a pure sub directory of
> that forum installation).
> 
> I tried this:
> 
> 
> ServerName domain2.com
> ServerAlias www.domain2.com
> ServerAdmin sgingter at web.de
> DocumentRoot /var/www/domain2/
> php_admin_value open_basedir /var/www/domain2/
> php_admin_flag safe_mode On
> ErrorLog /var/kunden/logs/sgingter-error.log
> CustomLog /var/kunden/logs/sgingter-access.log combined
> 
> SetHandler mono
> MonoApplications "/:/var/www/domain2"
> MonoDocumentRootDir "/var/www/domain2"
> 
> 
> But when I make a call to www.domain2.de/WebForm.aspx it delivers only the aspx source
> and it does not execute the application. Even with AddHandler mono .aspx .ascx .... it does
> not execute the asp.net application.
> 
> I also tried a and a tag
> around the SetHandler and/or AddHandler directive, but those doesn't work too.
> 
> There is no error in the logs or whatever, it just handles the aspx file like any other html or
> txt file and delivers it's plain text. This config does not touch my php, the php applications still
> run as they are intendet to.
> 
> The mod_mono_server is startet from apache and running (it's shown by ps aux) and well,
> I don't have a clue where to still look right now to get that running.
> 
> Please give me a hint or two to the thing I must have overlooked or I must have done the
> wrong way.
> 
> Some additional information: I'm running debian sarge and compiled mono by myself (as
> I said, by using an alias it works, also command-line .net applications run without problems).
> I use apache 1.3.34 and the latest stable mono sources.
> 
> Please help me, since I would love to use mono on linux for my .net applications. My apache's
> completely confused about so much stopping, starting and restarting that I think it will be soon
> really mad on me if that don't stops...
> 
> Thanks in advance,
> 
> Sebastian Gingter
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list