httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gustavo Córdova Avila <>
Subject Re: [users@httpd] totally reject from hostless requests
Date Tue, 30 Nov 2004 15:15:56 GMT
J. A. Viehweg wrote:

>Finally, my question:
>Is there some clean, easy, elegant way to block any and all requests
>into the server that do not contain a valid host/domain there, but are
>using an IP Address only.  Anything coming in with an IP Address only
>will not only be rejected, but not logged.
>I have tried a number of things, but I have not yet found a way to
>identify IP Address only requests, so my playing has been unsuccessful.
>I suspect this is not something that can be done, but one can hope!
>Switching to 2.+ is an option, if need be.  I'm planning on doing that
>in the next couple of months anyway.
>Thanks in advance.
I haven't tried it, but it might just work:

    1. Use server-name based virtual hosting.
    2. Create a default vhost for the ones which
       don't request a specific host.
    3. On the default vhost:

           Order Deny,Allow
           Deny from all
           ErrorLog /dev/null
           CustomLog /dev/null

It just clicked into my mind upon reading your email,
I don't really know if it'll work, but Apache's flexible
enough to make it work.

Good luck :-)
Gustavo Córdova Avila <> 
*Tel:* +52 (81) 8130-1919 ext. 127
Integraciones del Norte, S.A. de C.V.
Padua #6047, Colonia Satélite Acueducto
Monterrey, Nuevo León, México.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message