Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Поліпшення веб-сервера Apache Безпека: Використання ServerTokens і ServerSignature Відключення 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. Коли Apache HTTPD веб-сервер генерує яких-небудь веб-сторінках чи сторінках помилок, деякі важливі відомості про версію та інші деталі виконані за системою відображаються на веб-сайті й сервер заголовка. For example, the information text may be like this: Наприклад, інформація, текст може бути так:

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 сервера на xx.xx.xx.xx Порт 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. Лінія на сервері заголовка піддавайте важливо варіант і варіант інформацію про операційну систему Linux і Apache програмного забезпечення, що використовується на комп'ютері, побічно піддають можливих пролом у безпеки, які існують для хакерів, або, принаймні, зробити небезпечний нападавших легше визначити вашу систему доступна атака пікселів.

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. Для того, щоб Apache HTTP веб-сервер не ефір повідомлення для всієї світової громадськості та виправити можливі проблеми безпеки, зміна цих двох директив ServerTokes і ServerSignature в httpd.conf конфігураційних файлів.

  1. Login as root user or perform a sudo to the web server. Увійти як кореневого користувача або виконати Sudo на веб-сервері.
  2. Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Відкрити і відредагувати httpd.conf або apache2.conf (в Apache 2), VI або інший текстовий редактор. 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, як правило, розташовані в / ETC / HTTPD / Conf / або / etc/apache2 / або / і т.д. / Apache / (для Apache1.3), в залежності від Unix, який ви використовуєте.
  3. Locate the line with ServerTokens . Знайдіть рядок з ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Ви можете виконати пошук, набравши "/ ServerTokes" і натиснути "Введення".
  4. 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, вам, швидше за все, щоб побачити лінію починається з # ServerTokes Повний У цьому випадку, видалити або видалення символу # (натисканням 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 . Крім того, змінити Повний стати Prod (прес-р ключа для заміни одного символу, або R для заміни декількох символів), так що лінія стає ServerTokens Prod. In Apache 2.0 or 2.2, the line normally does not exist. У Apache 2.0 або 2.2, лінії, як правило, не існує. So the search will fail. Таким чином, пошук не вдасться. In this case, go to the bottom of config file, and add the new line with the following text. У цьому випадку перейдіть до нижньої частини конфігураційного файлу, і додати новий рядок з текстом. You can add new line by pressing o key. Ви можете додати новий рядок, натиснувши O ключа.

    ServerTokens Prod ServerTokens Prod

  5. Next, search for ServerSignature. Далі, пошук ServerSignature. In Apache13, the line should just above the line of ServerTokens. У Apache13, лінія повинна трохи вище лінії 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. Змінити лінію так, що вона виглядає так, і в Apache2, які ще не мають цієї лінії, по крайней додати нову.

    ServerSignature Off ServerSignature Off

  6. By now the Apache configuration file should have this two directives set as below: До теперішнього часу у файлі конфігурації Apache повинен мати цей дві директиви встановити як нижче:

    ServerSignature Off ServerSignature Off
    ServerTokens Prod ServerTokens Prod

    The 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. Перша лінія "ServerSignature Off" вказує Apache не показувати трейлінг колонтитулів лінія по серверу генеровані документи (повідомлення про помилки, mod_proxy FTP каталогу списки, mod_info продукції, і т.д.), яка відображає номер версії сервера, ІмяСервера від відбування віртуального хоста, адреса електронної пошти налаштування, і створює "електронної пошти:" посилання на ServerAdmin зі згаданих документів.

    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. Друга лінія "ServerTokens Prod" налаштовує Apache повернутися тільки в якості продукту Apache в заголовку відповіді сервера на дуже сторінку запиту, пригнічуючи OS, великі й дрібні версія Інфо.

  7. Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Збережіть і закрийте файл конфігурації натисканням Shift-Колон, а потім введіть WQ клавіш, і натисніть "Ввід".
  8. Restart Apache. Перезапустіть Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Типова команда служби HTTPD перезавантажити або / etc/init.d/apache2 перезавантажити.
  9. Now, you will get only the Apache in the server response header: Тепер ви будете одержувати тільки Apache в заголовку відповіді сервера:

    Server: Apache Сервер: Apache

IMPORTANT : The page is machine translated and provided "as is" without warranty. Увага: Ця сторінка машина переведена і надаються "як є" без гарантії. Machine translation may be difficult to understand. Машинний переклад може бути важким для розуміння. Please refer to Будь ласка, зверніться до original English article Англійська оригінальні статті whenever possible. коли це можливо.


2 Responses to “Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header” 2 Відповіді на "Удосконалення Apache Web Server Безпека: Використання ServerTokens і ServerSignature Відключення Header"

  1. Leonid Леонід
    November 17th, 2008 14:58 17 листопада 2008 14:58
    2 2

    Many thanks, i have been using the ServerSignature Off for long time now, but the second one is quite new. Большое спасибо, я з допомогою ServerSignature Off протягом тривалого часу, а другий є досить новим.

    Do you know how you can actually edit the serversignature so you will decide which information to send in case of an error? Чи знаєте ви, як можна реально змінити serversignature тому вам вирішувати, яка інформація для передачі в разі помилки?

  2. Nilesh Nilesh
    October 24th, 2008 17:00 Жовтень 24, 2008 17:00
    1 1

    It's really useful article to secure your dedicated web servers. Це дійсно корисний статті убезпечити Ваші спеціальний веб-серверів. The information provided is easy to make changes on the server. Надана інформація легко вносити зміни на сервері.

Leave a Reply Залишити Відповісти

Ім'я

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Ви можете використовувати ці теги: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <дель Datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Підписатися на коментарі функція була відключена. To receive notification of latest comments posted, subscribe to Щоб отримувати повідомлення про останніх коментарів, підписка на My Digital Life Comments RSS feed Моя Цифрова життя Коментарі RSS канал or або register to receive зареєструватися, щоб отримати new comments in daily email digest. нових коментарів у щоденній електронній пошті дайджест.
Custom Search

New Articles Нові статті

Incoming Search Terms for the Article Вхідний Умови пошуку для статті

apache ServerTokens Apache ServerTokens - -- servertokens apache servertokens Apache - -- apache2 servertoken apache2 servertoken - -- apache disable server header відключити сервер Apache заголовка - -- apache2 server header apache2-сервера заголовок - -- Apache server tokens Apache сервера жетонів - -- turn off server header apache вимкнути сервер Apache заголовка - -- servertokens footer servertokens колонтитул - -- apache disable header 404 Apache відключити заголовок 404 - -- disable serverinfo in apache відключити serverinfo в Apache - -- disable ServerSignature apache відключити ServerSignature Apache - -- disable ServerTokens відключити ServerTokens - -- http header remove Server HTTP-заголовок видалити сервер - -- apache2 servertokens apache2 servertokens - -- apache2 servertokens prod apache2 servertokens продукти - -- apache turn off signature Apache відключити підпис - -- http header server: Apache HTTP-заголовок сервер: Apache - -- Remove Server: Apache from headers Видаліть сервер: Apache з заголовками - -- ServerTokens Product Only Тільки ServerTokens продукції - -- absence ServerTokens apache2.conf Відсутність ServerTokens apache2.conf - -- apache servertokens off Apache servertokens Off - -- disable put apache відключити поставити Apache - -- header server modify Сервер змінити заголовок - -- how to disable apache headers Як відключити Apache заголовки - -- +apache +ServerToken + Apache + ServerToken - -- apache custom server signature Apache сервера користувальницьких підписів - -- apache2 disable server header apache2 відключити сервер заголовка - -- apache conf ServerToken Apache Conf ServerToken - -- apache ServerTokens httpd.conf Apache httpd.conf ServerTokens - -- appache ServerSignature mail appache ServerSignature поштою - -- appache ServerTokens appache ServerTokens - -- disable server signature відключити сервер підпису - -- how to eliminate apache version on error page Як усунути Apache версії помилково сторінка - -- how to disable apache version info Як відключити Apache версії Інфо - -- php server signature PHP сервер підпису - -- server signature off in apache Сервер від підписання в Apache - -- servertokens prod servertokens продукти - -- ServerTokens httpd.conf ServerTokens httpd.conf - -- ServerSignature httpd.conf ServerSignature httpd.conf - -- ServerTokens custom ServerTokens звичай - -- apache footer security Apache колонтитулів безпеки - -- hide ServerTokens apache заховати ServerTokens Apache - -- how to modify apache ServerTokens in ubuntu Як змінити ServerTokens Apache в Ubuntu - -- servertokens apache2 servertokens apache2 - --