Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Migliorare Apache Web Server Sicurezza: ServerTokens uso e ServerSignature per disattivare header
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 httpd Apache web server genera le pagine web o pagine di errore, alcune importanti informazioni sulla versione e le altre modalità attuate sul sistema sono visualizzate in ° sito web server di intestazione. For example, the information text may be like this: Ad esempio, le informazioni di testo può essere simile a questo:
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 a 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 linea nel server di intestazione esporre importante versione e variante informazioni sul sistema operativo Linux e Apache software utilizzato sulla macchina, indirettamente esporre i possibili buchi della sicurezza che sono esistiti per gli hacker, o almeno rendere più facile attaccanti dannoso per identificare il vostro sistema per attacco punti a disposizione.
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. Al fine di garantire che il HTTP Apache web server non trasmettere questo messaggio a tutto il mondo pubblico e fissare possibile problema di protezione, modificare queste due direttive ServerTokes e ServerSignature in httpd.conf file di configurazione.
- Login as root user or perform a sudo to the web server. Il login come utente root o eseguire una sudo per il server web.
- Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Aprire e modificare httpd.conf o apache2.conf (in Apache 2) vi o con altri editor di testo. 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 configurazione di Apache normalmente situati in / etc / httpd / conf / o / etc/apache2 / o / etc / apache / (per Apache1.3) a seconda di quale Unix si sta utilizzando.
- Locate the line with ServerTokens . Individuare la riga con ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. È possibile effettuare una ricerca digitando "/ ServerTokes" e premete Invio.
- 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 in Apache, è probabile che per vedere una linea che inizia con # ServerTokes Completo In questo caso, rimuovere o eliminare il carattere # (premendo il tasto 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 . Anche modificare la Completo di diventare Pro (premere il tasto di sostituire un carattere, o R per sostituire le molteplici caratteri), in modo che la linea diventa ServerTokens Prod. In Apache 2.0 or 2.2, the line normally does not exist. In Apache 2,0 o 2,2, la linea di norma non esiste. So the search will fail. Quindi la ricerca non andrà a buon fine. In this case, go to the bottom of config file, and add the new line with the following text. In questo caso, andare a fondo di file di configurazione e aggiungere la nuova linea con il seguente testo. You can add new line by pressing o key. È possibile aggiungere nuova linea premendo il tasto.
ServerTokens Prod ServerTokens Prod
- Next, search for ServerSignature. Avanti, ricerca per ServerSignature. In Apache13, the line should just above the line of ServerTokens. In Apache13, la linea dovrebbe appena sopra la linea di 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. Modificare la riga in modo che assomiglia a questo, in Apache2 che non dispongono già di questa linea, aggiungere a quello nuovo.
ServerSignature Off ServerSignature Off
- By now the Apache configuration file should have this two directives set as below: Da ora il file di configurazione di Apache dovrebbe avere presente due direttive impostata nel seguente modo:
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 prima linea "ServerSignature Off" incarica di Apache non per visualizzare un trailing footer della linea sotto server generato documenti (messaggi di errore, mod_proxy ftp elenchi di directory, mod_info uscita, e etc) che visualizza il numero di versione del server, NomeServer il servizio di host virtuale, e-mail impostazione, e crea un "mailto:" il riferimento alla ServerAdmin di riferimento il documento.
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 seconda linea "ServerTokens Prod" configura Apache per tornare solo Apache come prodotto nel header di risposta del server a pagina molto richiesta, sopprimendo OS, maggiori e minori delle informazioni sulla versione.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Salvare e chiudere il file di configurazione premendo Shift-Colon, quindi digitare tasti wq e premete Invio.
- Restart Apache. Riavviare Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Tipico comando è il servizio o riavviare httpd / etc/init.d/apache2 restart.
- Now, you will get only the Apache in the server response header: Adesso, avrete solo l'Apache nella risposta del server intestazione:
Server: Apache Server: Apache
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale in lingua inglese whenever possible. quando possibile.
Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .
Related Articles Articoli correlati
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 4
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Apache Stato (WHM-server-status) in cPanel webhost Manager Restituisce Bianche Page
- Easily Set Up Web Server with XAMPP Facilmente istituire server Web con XAMPP
- Remove and Uninstall or Disable ModSecurity (mod_security) Disinstallare e rimuovere o disattivare ModSecurity (mod_security)
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files A partire Apache HTTPD non riuscita a causa di Impossibile aprire o nessuna di tali mod_bwlimited, mod_log_bytes file o mod_bandwidth
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM non hanno ricevuto informazioni sullo stato della Apache errore
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: Asynchronous AcceptEx non di errore in Apache Accedi
- Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start Apache Avvisa NameVirtualHost *: 80 non ha alcun errore quando VirtualHosts Inizio
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Installare server Web in Windows XP con Apache2, PHP5 e MySQL4 - Parte 2
- Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time L'arresto auto e riavviare Apache httpd daemon di servizio a tempo preimpostato












