You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by oh...@cox.net on 2006/10/29 15:42:39 UTC

[users@httpd] Any problems deleting all "_default_" VirtualHosts?

Hi,

I was wondering if anyone has tried deleting/commenting out ALL of the "_default_" VirtualHost sections in httpd.conf/ssl.conf?

Does doing this cause any problems with Apache?

One of my colleagues has suggested that doing this helps secure Apache, because then Apache wouldn't process any requests that don't match our other <VirtualHost> sections, but my read of the Apache docs, e.g., http://www.apacheweek.com/issues/97-03-14, is that it doesn't prevent Apache from processing requests not matching any VirtualHost sections, but rather just causes Apache to process those requests from the "main server".

Also, when we tried that (deleting the "_default_" sections), I *think* (but am not sure) that we may have been seeing some behavior where Apache would "slow down", i.e., serve content very slowly.

Thanks,
Jim

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Any problems deleting all "_default_" VirtualHosts?

Posted by Joshua Slive <jo...@slive.ca>.
On 10/29/06, ohaya@cox.net <oh...@cox.net> wrote:
> Hi,
>
> I was wondering if anyone has tried deleting/commenting out ALL of the "_default_" VirtualHost sections in httpd.conf/ssl.conf?
>
> Does doing this cause any problems with Apache?
>
> One of my colleagues has suggested that doing this helps secure Apache, because then Apache wouldn't process any requests that don't match our other <VirtualHost> sections, but my read of the Apache docs, e.g., http://www.apacheweek.com/issues/97-03-14, is that it doesn't prevent Apache from processing requests not matching any VirtualHost sections, but rather just causes Apache to process those requests from the "main server".

You are correct.  If a request doesn't match any NameVirtualHost
directive and doesn't match any _default_ <VirtualHost>, then it will
be served by the main server.

>
> Also, when we tried that (deleting the "_default_" sections), I *think* (but am not sure) that we may have been seeing some behavior where Apache would "slow down", i.e., serve content very slowly.

No.  It should make no difference in speed.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org