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 конфігураційних файлів.
- Login as root user or perform a sudo to the web server. Увійти як кореневого користувача або виконати Sudo на веб-сервері.
- 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, який ви використовуєте.
- Locate the line with ServerTokens . Знайдіть рядок з ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Ви можете виконати пошук, набравши "/ ServerTokes" і натиснути "Введення".
- 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
- 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
- By now the Apache configuration file should have this two directives set as below: До теперішнього часу у файлі конфігурації Apache повинен мати цей дві директиви встановити як нижче:
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. Перша лінія "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, великі й дрібні версія Інфо.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Збережіть і закрийте файл конфігурації натисканням Shift-Колон, а потім введіть WQ клавіш, і натисніть "Ввід".
- Restart Apache. Перезапустіть Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Типова команда служби HTTPD перезавантажити або / etc/init.d/apache2 перезавантажити.
- 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. коли це можливо.
Related Articles Статті по темі
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Статус Apache (WHM-сервер-статус) в CPanel хостингу Менеджер Повертає порожню сторінку
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Установка веб-сервера на FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 5
- Request URL /server-status or 404 Page Not Found Apache Error Запит URL / сервер-статус або 404 Сторінка не знайдена помилка Apache
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Установка веб-сервера на FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 4
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Запуск Apache HTTPD збій, викликаний тим, може, не відкрито чи немає такої mod_bwlimited, mod_log_bytes або mod_bandwidth Файли
- cPanel WHM Failed to Receive Status Information From Apache Error WHM CPanel не отримали інформації про статус Від Apache помилку
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: Асинхронні AcceptEx Помилка Помилка в Apache Вхід
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Установка веб-сервера на Windows XP з Apache2, PHP5 і MySQL4 - Частина 2
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Установка веб-сервера на FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 3
- Fix Internal Server Error When Accessing Easy Apache in cPanel WebHosting Manager Рішення Внутрішня помилка сервера при доступі до Easy Apache в CPanel веб-хостинг менеджер










































November 17th, 2008 14:58 17 листопада 2008 14:58
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 тому вам вирішувати, яка інформація для передачі в разі помилки?
October 24th, 2008 17:00 Жовтень 24, 2008 17:00
It's really useful article to secure your dedicated web servers. Це дійсно корисний статті убезпечити Ваші спеціальний веб-серверів. The information provided is easy to make changes on the server. Надана інформація легко вносити зміни на сервері.