Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Zlepšiť Apache Web Server Bezpečnosť: Používajte ServerTokens a ServerSignature Vyhostiť 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. Keď webový server Apache httpd generuje akejkoľvek webovej stránky alebo stránky s chybami, niektoré dôležité informácie o verzii a ďalšie podrobnosti vykonávať na systéme sú zobrazené na webových stránkach servera tý hlavičke. For example, the information text may be like this: Napríklad informácie, text môže byť takhle:
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 at 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. Táto položka v hlavičke servera odhaliť dôležité verziu a variant informácie o operačnom systéme Linux a Apache softvér používaný na stroji, nepriamo odhaliť prípadné bezpečnostné diery, ktoré existovali k hackeri, alebo aspoň aby škodlivý útočníci ľahšie identifikovať váš systém dostupné útoku bodov.
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. Aby bolo zabezpečené, že Apache HTTP webový server nie je vysielanie tejto správy do celého sveta verejne a oprava možná bezpečnostný problém, zmeniť tieto dve smernice ServerTokes a ServerSignature v konfiguračnom súbore httpd.conf.
- Login as root user or perform a sudo to the web server. Prihlásiť sa ako root alebo sudo vykonať na webovom serveri.
- Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Otvoriť a upraviť httpd.conf alebo apache2.conf (v Apache 2) s vi alebo iný textový editor. 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. Apache konfigurácia zvyčajne nachádza v / etc / httpd / conf / alebo / etc/apache2 / alebo / etc / apache / (pre Apache1.3) v závislosti na Unix, ktorý ste pomocou.
- Locate the line with ServerTokens . Vyhľadajte riadok s ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Môžete vykonať vyhľadávanie zadaním "/ ServerTokes" a stlačte kláves 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). V Apache 1.3, budete pravdepodobne vidieť riadok začína # ServerTokes Úplné V tomto prípade odstráňte alebo vymazať # povahy (stlačením d key). 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 . Tiež zmeniť, aby sa stal Úplné Prod (stlačením klávesy r nahradiť jeden znak, alebo R nahradiť viac znakov), takže položka sa stáva ServerTokens prod. In Apache 2.0 or 2.2, the line normally does not exist. V Apache 2.0 alebo 2.2, riadok normálně neexistuje. So the search will fail. Takže hľadanie zlyhajú. In this case, go to the bottom of config file, and add the new line with the following text. V tomto prípade prejdite do dolnej časti konfiguračného súboru, a pridajte nový riadok s týmto textom. You can add new line by pressing o key. Môžete pridať nový riadok stlačením o kľúč.
ServerTokens Prod ServerTokens Prod
- Next, search for ServerSignature. Ďalšie hľadanie ServerSignature. In Apache13, the line should just above the line of ServerTokens. V Apache13, riadok by mal tesne nad líniou 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. Upraviť riadku, takže to vyzerá, ako je táto, a Apache 2, ktoré nie je už tento riadok, pridá sa na novú.
ServerSignature Off ServerSignature Vypnuté
- By now the Apache configuration file should have this two directives set as below: Dnes Apache konfiguračný súbor by mal mať túto súpravu dvoch smerníc, ako je uvedené nižšie:
ServerSignature Off ServerSignature Vypnuté
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. Prvá položka "ServerSignature Off" instruuje Apache nebude zobrazovať koncové footer line za server-generované dokumenty (chybové hlášky, mod_proxy ftp adresáre výpisy, mod_info výstup, a atď), ktoré sa zobrazí číslo verzie servera, názov_servera z slúžiace virtuálnej hosť, e-mail nastavenie a vytvára "mailto:" odkaz na ServerAdmin z odkazovaného dokumente.
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. Druhá položka "ServerTokens prod" konfiguruje Apache vrátiť iba Apache ako výrobok na serveri hlavičku odpovede na veľmi stránku žiadosti, potlačením OS, dur a moll version info.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Uložiť a zavrieť config file stlačením Shift-Colon a zadajte WQ kľúča, a stlačte kláves Enter.
- Restart Apache. Reštartujte Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Typický príkaz je služba httpd restart alebo / etc/init.d/apache2 restart.
- Now, you will get only the Apache in the server response header: Teraz sa dostanete iba na serveri Apache v hlavičke odpovede:
Server: Apache Server: Apache
IMPORTANT : The page is machine translated and provided "as is" without warranty. Upozornenie: Stránka je stroje preložené a poskytované "tak ako sú" bez záruky. Machine translation may be difficult to understand. Strojový preklad môže byť ťažké pochopiť. Please refer to Obráťte sa prosím na original English article Anglický originál článku whenever possible. kedykoľvek je to možné.
Related Articles Súvisiace články
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Apache Status (WHM-server-status) do cPanel webhost Manager Vracia Prázdne stránky
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Inštalácia webového servera na FreeBSD 6.0 s Apache 2.2, MySQL 5.0 a PHP 5 - Časť 5
- Request URL /server-status or 404 Page Not Found Apache Error Žiadosť URL / server-status alebo 404 Strana Nenájdené Apache Chyba
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Inštalácia webového servera na FreeBSD 6.0 s Apache 2.2, MySQL 5.0 a PHP 5 - Časť 4
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Spustenie Apache httpd Nepodarilo Kvôli nedá otvoriť ani žiadne takéto mod_bwlimited, mod_log_bytes alebo mod_bandwidth Súbory
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM Zlyhalo Dostávať Status Informácie z Apache Chyba
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: Asynchrónny AcceptEx zlyhalo Chyba v Apache Prihlásenie
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Inštalácia webového servera v systéme Windows XP s Apache 2, PHP5 a MySQL4 - časť 2
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Inštalácia webového servera na FreeBSD 6.0 s Apache 2.2, MySQL 5.0 a PHP 5 - Časť 3
- Fix Internal Server Error When Accessing Easy Apache in cPanel WebHosting Manager Fix Interná chyba servera pri prístupe Easy Apache v cPanel Webhosting Manager










































November 17th, 2008 14:58 17. novembra 2008 14:58
Many thanks, i have been using the ServerSignature Off for long time now, but the second one is quite new. Ďakujem, som bol s použitím ServerSignature off po dlhú dobu, ale na druhej je pomerne nová.
Do you know how you can actually edit the serversignature so you will decide which information to send in case of an error? Viete, ako môžete skutočne upraviť serversignature takže budete rozhodovať, aké informácie poslať v prípade, že je chyba?
October 24th, 2008 17:00 24. októbra 2008 17:00
It's really useful article to secure your dedicated web servers. Je to naozaj užitočné článok zabezpečte vaše špecializovaných internetových serveroch. The information provided is easy to make changes on the server. Poskytnuté informácie sa ľahko vykonať zmeny na serveri.