Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Uzlabot Apache Web servera drošības Izmantojiet ServerTokens un ServerSignature uz Disable 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. Kad Apache HTTPD interneta serveri rada jebkurā tīmekļa lapas vai kļūda lapas, svarīgu informāciju par versiju un citiem datiem īsteno, sistēma tiek parādīti th mājas lapas servera galvenes. For example, the information text may be like this: Piemēram, informāciju, tekstu, var būt šādi:
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. Līnijai servera header pakļaut svarīgi versija un variants informāciju par Linux operētājsistēma un Apache izmantoto programmatūru uz mašīnas, netieši pakļaut iespējamo drošības caurumiem, kas ir pastāvējuši uz hackers, vai vismaz veikt ļaunprātīgas attackers vieglāk identificēt jūsu sistēmu pieejamas uzbrukuma punktiem.
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. Lai nodrošinātu, ka Apache HTTP web serveris nav pārraidīt šo ziņojumu visā pasaulē publiski un noteikt iespējamos drošības jautājums, mainīt šo divu direktīvu ServerTokes un ServerSignature in httpd.conf konfigurācijas failu.
- Login as root user or perform a sudo to the web server. Login kā root lietotājam vai veikt sudo ar Web serveri.
- Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Atvērt un rediģēt httpd.conf vai apache2.conf (in Apache 2) ar vi vai citu teksta redaktoru. 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. Ar Apache konfigurācija parasti atrodas / etc / httpd / conf / vai / etc/apache2 / vai / etc / apache / (par Apache1.3) atkarībā no tā, kurš Unix jūs izmantojat.
- Locate the line with ServerTokens . Atrodiet saskaņā ar ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Jūs varat veikt meklēšanu pēc mašīnrakstīšanu "/ ServerTokes" un hit 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). Jo Apache 1.3, jums būs iespējams apskatīt līnija sākas ar # ServerTokes Pilns Šajā gadījumā, noņemt vai izdzēst # raksturs (nospiežot d atslēgu). 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 . Arī mainīt Pilns kļūt Prod (preses r taustiņu, lai aizstātu vienu rakstzīmi, vai R aizvietot dažādos rakstzīmes), tā, lai līnija kļūst ServerTokens Prod. In Apache 2.0 or 2.2, the line normally does not exist. Jo Apache 2.0 vai 2.2, līnijas parasti nav. So the search will fail. Tāpēc meklēt nedarbosies. In this case, go to the bottom of config file, and add the new line with the following text. Šajā gadījumā, atveriet apakšā config fails, un pievienojiet jaunu rindu ar šādu tekstu. You can add new line by pressing o key. Varat pievienot jaunu rindu nospiežot o taustiņu.
ServerTokens Prod ServerTokens Prod
- Next, search for ServerSignature. Otrkārt, meklēt ServerSignature. In Apache13, the line should just above the line of ServerTokens. In Apache13, līniju būtu tieši virs līnijas 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. Rediģēt līniju tā, lai tas izskatās šādi, un jo Apache2, kas nav jau ir šī pozīcija, pievienot pie jaunu.
ServerSignature Off ServerSignature Off
- By now the Apache configuration file should have this two directives set as below: Līdz šim Apache konfigurācijas failu jābūt šai divām direktīvām noteikts, kā turpmāk:
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. Pirmā līnija "ServerSignature Off" uzdod Apache nav rādīt trailing kājenes līnijas servera generated dokumentiem (kļūdas paziņojumus, mod_proxy ftp directory sarakstus, mod_info produkciju, un ETC), kas parāda servera versijas numuru, Servera_nosaukums no apkalpo virtuālo uzņēmējas, e-pasts Nosakot, un rada "mailto:" atsauce uz ServerAdmin par atsauces dokumentu.
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. Otrā līnija "ServerTokens Prod" konfigur Apache atgriezties tikai Apache kā produkta servera atbilde header uz ļoti page pieprasījuma apkarošanas OS, lielākie un nelielas versija info.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Saglabāt un aizvērt config file, nospiežot Shift-Colon, un tad ierakstiet WQ noteikšanai taustiņi, un hit Enter.
- Restart Apache. Restart Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Tipiski komandu pakalpojumu httpd restart vai / etc/init.d/apache2 restart.
- Now, you will get only the Apache in the server response header: Tagad jūs saņemsiet tikai Apache in servera atbilde galvene:
Server: Apache Server: Apache
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Apache statuss (WHM serveris statusa) in cPanel WebHost Manager Returns Blank Page
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 5.daļa
- Request URL /server-status or 404 Page Not Found Apache Error Pieprasījums URL / servera statusu vai 404 Page Not Found Apache kļūdu
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 4.daļa
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Starting Apache HTTPD Neizdevās Sakarā ar Cannot Atvērt vai nav šādas mod_bwlimited, mod_log_bytes vai mod_bandwidth Faili
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM Neizdevās Receive Statuss Informācija no Apache kļūdu
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: Asinhroni AcceptEx failed Kļūda Apache Log
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Install Web Server Windows XP ar Apache2, PHP5 un MySQL4 - 2.daļa
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 3.daļa
- Fix Internal Server Error When Accessing Easy Apache in cPanel WebHosting Manager Fix Internal Server Error Kad Piekļuve Easy Apache in cPanel WebHosting Manager










































November 17th, 2008 14:58 Novembris 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 ir, izmantojot ServerSignature Off ilgu laiku, bet otra ir diezgan jauns.
Do you know how you can actually edit the serversignature so you will decide which information to send in case of an error? Vai jūs zināt, kā Jūs patiesībā var rediģēt serversignature lai jūs izlems, kādu informāciju nosūtīt, ja ir kļūda?
October 24th, 2008 17:00 Oktobris 24, 2008 17:00
It's really useful article to secure your dedicated web servers. Tas ir patiešām noderīgs raksts, lai nodrošinātu jūsu tīmekļa serverus. The information provided is easy to make changes on the server. Sniegtā informācija ir viegli veikt izmaiņas uz servera.