httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gustavo Córdova Avila <gustavo.cord...@q-voz.com>
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.
>
>jaime
>
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 <gustavo.cordova@q-voz.com> 
<mailto:gustavo.cordova@q-voz.com>
*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: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


Mime
View raw message