[Mono-aspnet-list] Custom VirutalHosts

Batchwood jghsurfpro at hotmail.com
Mon Jul 20 15:22:07 EDT 2009

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 *:80>
     DocumentRoot /var/www
     ServerName www.domain.com
     etc .....

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've search the web for an answer and I've tried editing the default file in
site-available, but nothing works. All other domains are still directed to

Is this possible in Mono?

View this message in context: http://www.nabble.com/Custom-VirutalHosts-tp24575950p24575950.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.

More information about the Mono-aspnet-list mailing list