Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Améliorer Apache Web Server Security: ServerTokens utilisation et de désactiver ServerSignature tête
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. Lorsque Apache HTTPD serveur Web génèrent des pages Web ou des pages d'erreur, d'importantes informations sur la version et les autres modalités mises en œuvre sur le système sont affichés dans le site Web e-têtes du serveur. For example, the information text may be like this: Par exemple, le texte d'information mai être comme ceci:
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) Server PHP/4.3.10-10ubuntu4 à xx.xx.xx.xx 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. La ligne sur le serveur tête exposer important version et la variante d'informations sur le système d'exploitation Linux et Apache logiciels utilisés sur la machine, indirectement, la possibilité d'exposer les failles de sécurité qui sont en place pour les pirates, ou au moins faire malveillants attaquants plus facile à identifier votre système pour attaque des points disponibles.
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. Pour faire en sorte que Apache HTTP serveur Web ne diffuse pas ce message au monde entier au public et de fixer la mesure du possible problème de sécurité, de modifier ces deux directives ServerTokes et ServerSignature dans le fichier de configuration httpd.conf.
- Login as root user or perform a sudo to the web server. Ouverture de session sous l'utilisateur root ou effectuer un sudo pour le serveur web.
- Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Ouvrir et éditer httpd.conf ou apache2.conf (dans Apache 2) avec vi ou autre éditeur de texte. 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. La configuration d'Apache normalement situé dans / etc / httpd / conf / ou / etc/apache2 / ou / etc / apache / (pour Apache1.3), selon qui Unix que vous utilisez.
- Locate the line with ServerTokens . Localisez la ligne avec ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Vous pouvez effectuer une recherche en tapant "/ ServerTokes" et appuyez sur Entrée.
- 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). 1,3 dans Apache, vous aurez probablement à voir une ligne commence par # ServerTokes plein Dans ce cas, retirer ou supprimer le caractère # (en appuyant sur d clé). 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 . Également modifier le plein de devenir Prod (appuyez sur la touche r clé pour remplacer un caractère, ou R pour remplacer les multiples caractères), de sorte que la ligne devient ServerTokens Prod. In Apache 2.0 or 2.2, the line normally does not exist. Dans Apache 2,0 ou 2,2, normalement la ligne n'existe pas. So the search will fail. Ainsi, la recherche échouera. In this case, go to the bottom of config file, and add the new line with the following text. Dans ce cas, allez au fond du fichier de configuration, et ajouter la nouvelle ligne avec le texte suivant. You can add new line by pressing o key. Vous pouvez ajouter de nouvelles en ligne en appuyant sur le touche.
ServerTokens Prod ServerTokens Prod
- Next, search for ServerSignature. Ensuite, des recherches pour ServerSignature. In Apache13, the line should just above the line of ServerTokens. En Apache13, la ligne juste au-dessus de la ligne 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. Modifier la ligne afin qu'elle ressemble à ceci, et Apache2 qui ne possèdent pas encore de cette ligne, en ajouter de nouvelles.
ServerSignature Off ServerSignature Off
- By now the Apache configuration file should have this two directives set as below: En maintenant le fichier de configuration d'Apache devrait avoir ces deux directives défini comme suit:
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. La première ligne "ServerSignature Off" Apache instruction de ne pas afficher un bas de ligne traîne sous-serveur généré des documents (messages d'erreur, mod_proxy ftp listes de répertoires, mod_info sortie, et etc) qui affiche le numéro de version de serveur, ServerName de l'hôte virtuel au service, e-mail création, et crée un "mailto:" référence à la ServerAdmin du document de référence.
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. La deuxième ligne "ServerTokens Prod" configure Apache pour n'y revenir que produit Apache comme serveur dans la tête de réponse très page sur demande, la suppression de système d'exploitation, majeurs et mineurs des informations de version.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Enregistrez et fermez le fichier de configuration en appuyant sur Shift-Colon, puis tapez les touches wq, et appuyez sur Entrée.
- Restart Apache. Redémarrez Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Typiques de commande est le service httpd restart ou / etc/init.d/apache2 restart.
- Now, you will get only the Apache in the server response header: Maintenant, vous obtiendrez uniquement Apache sur le serveur tête de réponse:
Server: Apache Serveur: Apache
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANT: Il s'agit d'une machine qui traduit la page est fourni «tel quel», sans garantie. Machine translation may be difficult to understand. La traduction automatique mai être difficile à comprendre. Please refer to S’il vous plaît se référer à original English article l'article original en anglais whenever possible. chaque fois que possible.
Share and contribute or get technical support and help at Partagez et contribuer ou obtenir de l'aide technique et l'aide à My Digital Life Forums Ma vie numérique forums .
Related Articles Articles connexes
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Installation du serveur Web dans FreeBSD 6,0 avec Apache 2,2, 5,0 MySQL et PHP 5 - Partie 4
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Situation Apache (serveur WHM-statut) dans cPanel WebHost Manager retours Blank Page
- Easily Set Up Web Server with XAMPP Mettre en place facilement serveur Web avec XAMPP
- Remove and Uninstall or Disable ModSecurity (mod_security) Retirez et désinstaller ou désactiver ModSecurity (mod_security)
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files A Apache HTTPD a échoué en raison Impossible d'ouvrir ou si aucune mod_bwlimited, mod_log_bytes ou mod_bandwidth Fichiers
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM pas réussi à recevoir des informations sur l'état de l'Apache erreur
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: Asynchronous AcceptEx pas d'erreur dans log d'Apache
- Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start Apache avertir NameVirtualHost *: 80 n'a pas de serveurs virtuels erreur lorsque Commencer
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 L'installation de Web Server sous Windows XP avec Apache2, MySQL4 et PHP5 - Partie 2
- Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto Arrêt et redémarrer Apache HTTPD service démon à durée prédéfinie








