[Mono-list] Mono 1.2, mod_mono and virtual hosts

Maxim makska at yandex.ru
Wed Nov 22 04:31:36 EST 2006


Thanks, Gonzalo!
I've added "MonoSetServerAlias" to all Locations and updated Mono and 
Webserver to version 1.2.1-1.
But it doesn't work. When I tried to start all vhosts in one "default" 
application, I've got "download" prompt in browser while accessing to 
all these sites. So, mono-server doesn't handle requests to .aspx and 
other pages in this configuration...
I can start apache only with multiple instances of mod-mono-server again.
Virtual host with "mod-mono-server2" application doesn't work at all 
after updating (before updating it worked).

Here is a part of httpd.conf file which should work, but doesn't. In 
this configuration two virtual hosts ("site1" and "site2") should be 
handle by "default" mod-mono-server instance, and vhost "site3" by 
"site3app" mod-mono-server2 instance.
Tell me please, where I'm wrong?

------------------------------------------------------

<VirtualHost *:80>
    ServerName www.site1.com
    DocumentRoot /var/www/html/site1.com
    AddMonoApplications default "www.site1.com:/:/var/www/html/site1.com"
    <Location />
       AddHandler mono .aspx .ascx .config .axd .asax .ashx .asmx
       MonoSetServerAlias default
    </Location
</VirtualHost>

<VirtualHost *:80>
    ServerName www.site2.com
    DocumentRoot /var/www/html/site2.com
    AddMonoApplications default "www.site2.com:/:/var/www/html/site2.com"
    <Location />
       AddHandler mono .aspx .ascx .config .axd .asax .ashx .asmx
       MonoSetServerAlias default
    </Location
</VirtualHost>

<VirtualHost *:80>
    ServerName www.site3.com
    DocumentRoot /var/www/html/site3.com
    AddMonoApplications site3app "www.site3.com:/:/var/www/html/site3.com"
    MonoServerPath "/usr/bin/mod-mono-server2"
    <Location />
       AddHandler mono .aspx .ascx .config .axd .asax .ashx .asmx
       MonoSetServerAlias site3app
    </Location
</VirtualHost>



> On Sat, 2006-11-18 at 09:20 +0300, Maxim wrote:
>   
>> Hello!
>>
>> I've just updated Mono on my server and found that all sites don't work 
>> after it.
>> My Apache 2.0 was configured to run all web-sites in one instance of 
>> mod-mono-server, like this (httpd.conf):
>>
>> AddMonoApplications default "www.site1.com:/:/var/www/html/site1.com"
>> AddMonoApplications default "www.site2.com:/:/var/www/html/site2.com"
>>
>> <VirtualHost *:80>
>>     ServerName www.site1.com
>>     DocumentRoot /var/www/html/site1.com
>>     <Location />
>>        AddHandler mono .aspx .ascx .config .axd .asax .ashx .asmx
>>     </Location
>> </VirtualHost>
>>
>> <VirtualHost *:80>
>>     ServerName www.site2.com
>>     DocumentRoot /var/www/html/site2.com
>>     <Location />
>>        AddHandler mono .aspx .ascx .config .axd .asax .ashx .asmx
>>     </Location
>> </VirtualHost>
>>
>>
>> After updating Mono I can found only the following Apache configuration 
>> to run web-sites again (multiple instances of mod-mono-server, for each 
>> virtual host):
>>
>> <VirtualHost *:80>
>>     ServerName www.site1.com
>>     DocumentRoot /var/www/html/site1.com
>>     MonoApplications /:/var/www/html/site1.com
>>     <Location />
>>        AddHandler mono .aspx .ascx .config .axd .asax .ashx .asmx
>>     </Location
>> </VirtualHost>
>>
>> <VirtualHost *:80>
>>     ServerName www.site2.com
>>     DocumentRoot /var/www/html/site2.com
>>     MonoApplications /:/var/www/html/site2.com
>>     <Location />
>>        AddHandler mono .aspx .ascx .config .axd .asax .ashx .asmx
>>     </Location
>> </VirtualHost>
>>
>> Is there any ways to run all these web-sites in one instance of 
>> mod-mono-server?
>>     
>
> Insert a 'MonoSetServerAlias default' in the locations that have
> mod_mono as a handler.
>
>   
>> Also, what should I do to run some web-sites (virtual hosts) using 
>> mod-mono-server2 (ASP.Net 2.0) ?
>>     
>
> Use:
> MonoServerPath "/use/bin/mod-mono-server2"
>
> -Gonzalo
>
>
> _______________________________________________
> 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