[Mono-aspnet-list] Custom VirutalHosts

Gonzalo Paniagua Javier gonzalo.mono at gmail.com
Mon Jul 20 22:36:51 EDT 2009


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




More information about the Mono-aspnet-list mailing list