habilitando o HostnameLookups do Apache, não pode encontrá-lo no httpd.conf

3

Eu quero ativar HostnameLookups . Eu abri httpd.conf mas não encontrei nenhum HostnameLookups . Preciso adicionar uma linha eu mesmo e qual é a sintaxe?

    
por silow 10.02.2011 / 06:27

3 respostas

1

Veja este link :

This directive enables DNS lookups so that host names can be logged (and passed to CGIs/SSIs in REMOTE_HOST). The value Double refers to doing double-reverse DNS lookup. That is, after a reverse lookup is performed, a forward lookup is then performed on that result. At least one of the IP addresses in the forward lookup must match the original address. (In "tcpwrappers" terminology this is called PARANOID.)

Regardless of the setting, when mod_authz_host is used for controlling access by hostname, a double reverse lookup will be performed. This is necessary for security. Note that the result of this double-reverse isn't generally available unless you set HostnameLookups Double. For example, if only HostnameLookups On and a request is made to an object that is protected by hostname restrictions, regardless of whether the double-reverse fails or not, CGIs will still be passed the single-reverse result in REMOTE_HOST.

The default is Off in order to save the network traffic for those sites that don't truly need the reverse lookups done. It is also better for the end users because they don't have to suffer the extra latency that a lookup entails. Heavily loaded sites should leave this directive Off, since DNS lookups can take considerable amounts of time. The utility logresolve, compiled by default to the bin subdirectory of your installation directory, can be used to look up host names from logged IP addresses offline.

Finally, if you have hostname-based Require directives, a hostname lookup will be performed regardless of the setting of HostnameLookups.

    
por 10.02.2011 / 08:19
3

HostnameLookups é parte do núcleo do apache, então você só precisa adicionar o linha no arquivo de configuração.

Tenha cuidado, porém, a pesquisa do DNS no IP do cliente é geralmente lenta e não confiável (muitos endereços IP não têm um registro reverso no DNS).

    
por 10.02.2011 / 08:25
0

Qual distribuição você está usando? Se você estiver usando o Ubuntu, em uma instalação padrão do Apache, você encontrará em /etc/apache2/apache2.conf :

# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
    
por 12.09.2013 / 16:46

Tags