Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Melhorar o servidor web Apache segurança: Use ServerTokens e ServerSignature para desativar cabeçalho
When Apache HTTPD web server generates any web pages or error pages, some important information about the version and other details implemented on the system are displayed in th web site server header. Quando servidor web Apache HTTPD gera páginas da web ou erro páginas, algumas informações importantes sobre a versão e outros detalhes sobre o sistema implementado são exibidos no cabeçalho ª servidor web site. For example, the information text may be like this: Por exemplo, as informações podem ser texto como este:
Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Server: Apache/2.0.53 (Ubuntu) PHP/4.3.10-10ubuntu4 Server at xx.xx.xx.xx Port 80 Server: Apache/2.0.53 (Ubuntu) PHP/4.3.10-10ubuntu4 Server xx.xx.xx.xx em Port 80
The line in the server header expose important version and variant information about the Linux operating system and Apache software used on the machine, indirectly expose the possible security holes that are existed to the hackers, or at least make malicious attackers easier to identify your system for available attack points. A linha de cabeçalho do servidor versão e variante importante expor informações sobre o sistema operacional Linux e Apache software utilizado na máquina, indirectamente expor as possíveis falhas de segurança que são existia para os hackers, ou pelo menos fazer atacantes maliciosos mais fácil de identificar o seu sistema de disponível ataque pontos.
To ensure that the Apache HTTP web server does not broadcast this message to the whole world publicly and fix possible security issue, modify these two directives ServerTokes and ServerSignature in httpd.conf configuration file. Para garantir que o servidor web Apache HTTP não é transmitido esta mensagem ao mundo inteiro publicamente e corrigir eventuais questão de segurança, modificar estas duas directivas ServerTokes e no httpd.conf ServerSignature arquivo de configuração.
- Login as root user or perform a sudo to the web server. Login como root ou sudo para executar um servidor da web.
- Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Abrir e editar httpd.conf ou apache2.conf (no Apache 2) com o vi ou outro editor de texto. The Apache configuration normally located in /etc/httpd/conf/ or /etc/apache2/ or /etc/apache/ (for Apache1.3) depending on which Unix you’re using. O Apache configuração normalmente localizado em / etc / httpd / conf / ou / etc/apache2 / ou / etc / apache / (para Apache1.3) dependendo de qual você estiver usando Unix.
- Locate the line with ServerTokens . Localize a linha com ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Você pode realizar uma busca, digitando "/ ServerTokes" e pressione Enter.
- In Apache 1.3, you will likely to see a line starts with #ServerTokes Full In this case, remove or delete the # character (by pressing d key). Em 1,3 Apache, você provavelmente verá uma linha que começa com # ServerTokes Full Neste caso, remover ou apagar o caractere # (pressionando a tecla d). Also modify the Full to become Prod (press r key to replace one character, or R to replace multiple characters), so that the line becomes ServerTokens Prod . Também modificar o Pleno para se tornar Prod (r prima fundamental para substituir um personagem, ou R para substituir vários personagens), de modo a que a linha passa ServerTokens Prod. In Apache 2.0 or 2.2, the line normally does not exist. No Apache 2,0 ou 2,2, a linha normalmente não existe. So the search will fail. Portanto, a pesquisa irá falhar. In this case, go to the bottom of config file, and add the new line with the following text. Neste caso, vá para a parte inferior do arquivo config, e adicionar a nova linha com o seguinte texto. You can add new line by pressing o key. Você pode adicionar nova linha pressionando o botão.
ServerTokens Prod ServerTokens Prod
- Next, search for ServerSignature. Em seguida, busca de ServerSignature. In Apache13, the line should just above the line of ServerTokens. Em Apache13, a linha deve apenas acima da linha de ServerTokens. Edit the line so that it looks like this, and in Apache2 which doesn’t already have this line, add in at new one. Edite a linha de modo que parece que esse processo e, em Apache2 que não têm já essa linha, em pelo adicionar um novo.
ServerSignature Off ServerSignature Off
- By now the Apache configuration file should have this two directives set as below: Até agora o arquivo de configuração do Apache deve ter presente duas directivas que é definido como a seguir:
ServerSignature Off ServerSignature Off
ServerTokens Prod ServerTokens ProdThe first line “ServerSignature Off” instructs Apache not to display a trailing footer line under server-generated documents (error messages, mod_proxy ftp directory listings, mod_info output, and etc) which displays server version number, ServerName of the serving virtual host, email setting, and creates a “mailto:” reference to the ServerAdmin of the referenced document. A primeira linha "ServerSignature Off" encarrega Apache para não exibir um trailing rodapé ao abrigo do servidor-line gerados documentos (mensagens de erro, mod_proxy ftp diretório listagens, mod_info saída, e etc) que mostra a versão número, a servir de servidor virtual host, e-mail configuração, e cria um "mailto:" referência para o ServerAdmin do documento referenciado.
The second line “ServerTokens Prod” configures Apache to return only Apache as product in the server response header on very page request, suppressing OS, major and minor version info. A segunda linha "ServerTokens Prod" configura o Apache para retornar apenas o Apache como servidor produto no cabeçalho da resposta ao pedido muito página, suprimindo OS, pequenas e grandes versão info.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Salvar e fechar o arquivo de configuração, pressionando Shift-Colon e, em seguida, digite QE chaves, e pressione Enter.
- Restart Apache. Reinicie o Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Típico comando é reiniciado ou serviço httpd / etc/init.d/apache2 restart.
- Now, you will get only the Apache in the server response header: Agora, você receberá apenas a resposta do servidor Apache no cabeçalho:
Server: Apache Servidor: Apache
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.
Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .
Related Articles Artigos relacionados
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalando Web Server no FreeBSD 6,0 a 2,2 Apache, MySQL e 5,0 PHP 5 - Parte 4
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Status Apache (whm-server-status), em cPanel WebHost Manager Retorna página em branco
- Easily Set Up Web Server with XAMPP Facilmente criado com o servidor web XAMPP
- Remove and Uninstall or Disable ModSecurity (mod_security) Retire e Desinstalar ou Desativar ModSecurity (mod_security)
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Iniciando o Apache HTTPD falhou devido a Não consigo abrir ou no Tais mod_bwlimited, mod_log_bytes ou mod_bandwidth Files
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM falhou estado a receber informações de erro Apache
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: Asynchronous AcceptEx falhou Erro no Apache Log
- Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start Apache avisar NameVirtualHost *: 80 não tem qualquer erro ao iniciar VirtualHosts
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 2
- Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto shutdown e reiniciar o Apache httpd serviço daemon a hora predefinida















