Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Pagerinti Apache Web Server Security: Naudokite ServerTokens ir ServerSignature išjungti antraštė
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. Kai Apache HTTPD interneto serveris generuoja bet tinklalapius arba klaidų puslapius, kai kurios svarbios informacijos apie versiją ir kitų detalių įgyvendinami sistemos rodomi oji tinklalapio serveris antraštėje. For example, the information text may be like this: Pavyzdžiui, informacija, tekstas gali būti panašus į šį:
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. Eilutę serveris antraštė atskleisti svarbų versija ir variantą informacijos apie operacinę sistemą Linux ir Apache programinės įrangos naudojamos mašinos, netiesiogiai išvengti galimų saugumo skylės, kurios egzistavo iki hakerami, ar bent padaryti kenksminga puola lengviau nustatyti jūsų sistemą prieinama puolimo taškų.
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. Siekiant užtikrinti, kad Apache web serveris nepalaiko transliuoti šį pranešimą visame pasaulyje viešai ir nustatyti galimą saugumo problemą, pakeisti šias dvi direktyvas ServerTokes ir ServerSignature į httpd.conf konfigūracijos failo.
- Login as root user or perform a sudo to the web server. Prisijungti kaip root vartotojo arba atlikti sudo prie interneto serverio.
- Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Atidaryti ir redaguoti httpd.conf arba apache2.conf (Apache 2) su vi arba kitų tekstų redaktoriumi. 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 konfigūracijos paprastai esančių / etc / httpd / conf / arba / etc/apache2 / arba / etc / apache / (už Apache1.3) atsižvelgiant į tai, kuri Unix jūs naudojate.
- Locate the line with ServerTokens . Raskite eilutę su ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Jūs galite atlikti paiešką pagal rašyti "/ ServerTokes" ir paspauskite "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). Apache 1.3, jums gali pamatyti eilutė prasideda # ServerTokes Visas Šiuo atveju, pašalinti ar ištrinti # pobūdžio (paspausdami d raktas). 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 . Taip pat pakeisti Visas tapti Prod (paspauskite R klavišą pakeisti vieną simbolį, arba R pakeisti keletą simbolių), kad linija tampa ServerTokens Prod. In Apache 2.0 or 2.2, the line normally does not exist. Apache 2.0 arba 2.2, linijos, paprastai nėra. So the search will fail. Taigi, paieškos nebus. In this case, go to the bottom of config file, and add the new line with the following text. Šiuo atveju eikite į dugną konfigūracijos failą ir pridėti naują eilutę su šiuo tekstu. You can add new line by pressing o key. Jūs galite pridėti naują eilutę spausdami o klavišą.
ServerTokens Prod ServerTokens Prod
- Next, search for ServerSignature. Toliau ieškoti ServerSignature. In Apache13, the line should just above the line of ServerTokens. Į Apache13, linija turi tik virš linijos 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. Redaguoti linija taip, kad atrodo tai ir Apache2, kuri nėra jau šią liniją, įtraukti į naują.
ServerSignature Off ServerSignature Išjungta
- By now the Apache configuration file should have this two directives set as below: Šiuo metu Apache konfigūracijos failas turi turėti šios dvi direktyvos, numatančios, kaip nurodyta toliau:
ServerSignature Off ServerSignature Išjungta
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. Pirmoje eilutėje "ServerSignature Off" paveda Apache negali rodyti užsisklęs footer line pagal serverio generuojami dokumentai (pranešimai apie klaidas, mod_proxy ftp katalogas aukcionai, mod_info produkcija ir tt), kuri rodo serverio versijos numerį, ServerioVardas iš aptarnaujančių virtualaus serverio, elektroninio pašto nustatymą, ir sukuria "mailto:" nuoroda į ServerAdmin ir pamatinis dokumentas.
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. Antroji eilutė "ServerTokens Prod" sukonfigūruoja Apache grįžti tik Apache kaip produkto serverio atsakymo antraštėje labai puslapyje prašymą, sulaiko OS didelių ir nedidelių versija info.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Įrašyti ir uždaryti failo config spausdami Shift-Colon, tada įveskite wq klavišus, ir paspauskite Enter.
- Restart Apache. Paleiskite Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Tipiška komanda paslauga httpd paleisti ar / etc/init.d/apache2 paleisti.
- Now, you will get only the Apache in the server response header: Dabar gausite tik Apache į serverio atsakymo antraštėje:
Server: Apache Serveris: Apache
IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.
Related Articles Susiję straipsniai
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Apache statusas (whm serverio statuso) į cPanel Webhost Vadybininkas grąžinimai Blank Page
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Diegimas serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 5 dalis
- Request URL /server-status or 404 Page Not Found Apache Error Prašymas adresą / serverio statuso arba 404 Puslapis nerastas Apache Klaida
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Diegimas serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 4 dalis
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Starting Apache HTTPD Nepavyko Dėl Nepavyko atidaryti arba Ne Toks mod_bwlimited, mod_log_bytes arba mod_bandwidth Failai
- cPanel WHM Failed to Receive Status Information From Apache Error Cpanel WHM Nepavyko gauti informaciją apie iš Apache Klaida
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: asinchroninius AcceptEx nepavyko Klaida Apache Log
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Įdiekite Serverio Windows XP Apache2, PHP5 ir MySQL4 - 2 dalis
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Diegimas serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 3 dalis
- Fix Internal Server Error When Accessing Easy Apache in cPanel WebHosting Manager Fix Internal Server Error Kai prieiga prie Lengva Apache į cPanel Webhosting vadybininkas










































November 17th, 2008 14:58 Lapkritis 17, 2008 14:58
Many thanks, i have been using the ServerSignature Off for long time now, but the second one is quite new. Many thanks, i buvo naudojant ServerSignature Ne ilgai dabar, o antroji yra gana nauja.
Do you know how you can actually edit the serversignature so you will decide which information to send in case of an error? Ar žinote, kaip jūs iš tikrųjų galite redaguoti serversignature todėl jums nuspręsti, kurią informaciją siųsti atveju klaidą?
October 24th, 2008 17:00 Spalis 24, 2008 17:00
It's really useful article to secure your dedicated web servers. Tai tikrai naudinga Straipsniai apsaugoti jūsų skirta interneto serverių. The information provided is easy to make changes on the server. Pateikta informacija yra lengvai atlikti pakeitimus į serverį.