[Pkg-mono-devel] Re: Timeframe for libapache2-mod-mono

Sam Liddicott sam@liddicott.com
Tue, 21 Sep 2004 22:25:01 +0100


Peter Magnusson wrote:
> A description on how I did the setup can be found at 
> http://crippledcanary.nu/monoresources/howtos/HOWTO.libapache2-mod-mono

These notes were helpful to me.
I am puzzled about the complex contents of

mono-server-hosts.conf

that is included in httpd.conf

It seems that the global parts needed are:

<IfModule mod_mono.c>
   MonoUnixSocket /tmp/.mod_mono_server
   MonoServerPath /usr/share/dotnet/bin/mod-mono-server.exe
   AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx
   MonoApplicationsConfigDir /etc/mono-server
   MonoPath /usr/share/dotnet/lib:/usr/lib:/usr/share/dotnet/lib:

But the per-vhost stuff seems partial and over complicated.
I got it to work with just this:

In my vhost section I just have:
<IfModule mod_mono.c>
    AddHandler mono .aspx
</IfModule>

And then I add index.aspx to my global DirectoryIndex directive

So the only magic needed is in my debian.webapp where I have:

   <web-application>
     <name>nl</name>
     <vpath>/</vpath>
     <path>/home/nl/web</path>
     <vhost>www.domainname.nl</vhost>
     <port>80</port>
   </web-application>

It then seems to me that any .aspx files in my document root are handled 
by the mono-server that shares the same vhost name and document root. In 
fact because everything is so the same I wonder that it needs to be 
specified in debian.webapp at all and why mod_mono can't just tell it to 
mono-server when it makes the request?

I did find what I think to be a bug in that in debian.webapp it seems 
that wildcard vhost take priority over any other webapp, even those that 
had specific matching vhost names AND even when the wildcard vhost did 
NOT MATCH on vpath !!! But if I set my vhost to the anything else like 
IP address then vhosting works fine.

Sam

Sam


> 
> 
> On Mon, Sep 20, 2004 at 10:53:05PM +0300, Fabian Fagerholm wrote:
> 
>>On Mon, 2004-09-20 at 13:14 +0200, Peter Magnusson wrote:
>>
>>>I have now tested a simple HelloWorld with codebehind asp.net page with 
>>>Success. I will do more tests later.
>>
>>If at all possible, could you perhaps post your test files to the list
>>so that others can try them? Having a known working configuration can be
>>invaluable for testing.
>>
>>Basically, I'd like to see the steps taken from "apt-get install
>>apache2" to a working Mono ASP.NET environment. If we can get that
>>documented, we've come a long way. There are many special cases to add
>>after that, but it's a solid start.
>>
>>Cheers,
>>-- 
>>Fabian Fagerholm <fabbe@paniq.net>