[Mono-aspnet-list] Custom VirutalHosts

Batchwood jghsurfpro at hotmail.com
Tue Jul 21 00:11:46 EDT 2009



Gonzalo Paniagua Javier-5 wrote:
> 
> On Mon, 2009-07-20 at 12:22 -0700, Batchwood wrote:
>> Hi All,
>> In a regular apache configuration file, you can set up a "catch all"
>> virtualHost so that if a visitor or a bot tries to visit any non-existent
>> site on you server, they get a 404 error. Here's what I mean:
>> 
>>     <VirtualHost *:80>
>>      DocumentRoot /var/www/
>>      ServerName bogus
>>      ErrorDocument 404 "/unknown.html"
>>     </VirtualHost>
>> 
>>     <VirtualHost *:80>
>>      DocumentRoot /var/www
>>      ServerName www.domain.com
>>      etc .....
>>     </VirtualHost>
>> 
>> With this basic settings, only those visiting www.domain.com get through,
>> all other misspelled, removed sites are sent to an error 404 page;
>> however,
>> although this is easy in regular apache, I can't get it to work in Mono.
> 
> I don't see mono involved anywhere in your configuration. Perhaps you
> should ask in the apache list...
> 
> -Gonzalo
> 
> 
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> 
> 
Good point Gonzalo; however, I don't think it's an Apache issue. If I add
this VirtualHost code to Apache2.conf where it normally goes, I can't
restart Apache. Because Mono put an include statement to
/etc/apache2/sites-available in Apache2.conf, I can only think that the
virutalHost code must go somewhere in one of the files in sites-available,
but I can't find out where. Any ideas?
-- 
View this message in context: http://www.nabble.com/Custom-VirutalHosts-tp24575950p24581410.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list