Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header שיפור האבטחה של שרת האינטרנט אפאצ 'י: השתמש ServerTokens ו ServerSignature להשבית כותרת
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 שרת: 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 שרת: 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. התחבר בתור משתמש root או sudo כדי לבצע את שרת האינטרנט.
- Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. פתח וערוך httpd.conf או apache2.conf (אפאצ 'י ב 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. התצורה של אפאצ 'י בדרך כלל במיקום / etc / httpd / Conf / או / etc/apache2 / או / etc / 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). אפאצ 'י ב 1.3, אתה צפוי לראות שורה מתחיל # ServerTokes מלאה במקרה זה, להסיר או למחוק את # התווים (על ידי הקשה על מקש ד). 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 כדי להחליף תו אחד, או R כדי להחליף מספר תווים), כך הוא הופך את הקו ServerTokens prod. In Apache 2.0 or 2.2, the line normally does not exist. אפאצ 'י ב 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" מורה לא אפאצ 'י כדי להציג שורה תחתונה נגרר תחת שרת שנוצר מסמכים (הודעות שגיאה, mod_proxy FTP Directory רישומים, mod_info הפלט, ו וכו') אשר מציגה שרת מספר הגירסה של שרת וירטואלי לשרת המארח, דוא"ל הגדרה, ויוצר "mailto:" התייחסות 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" מגדיר את אפאצ 'י אפאצ' י לחזור רק בתור המוצר השרת תגובה על הכותרת מאוד בדף הבקשה, suppressing OS המפקד ואת הגירסה המשני מידע.
- Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. שמור וסגור את הקובץ באמצעות לחיצה על config-Shift קולון, ולאחר מכן הקלד wq מפתחות, ופגע הזן.
- Restart 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: עכשיו, אתה תקבל רק את אפאצ 'י של השרת כותרת התגובה:
Server: 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 אפאצ 'י המצב (whm-Server-מעמד) ב 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 בקשת כתובת האתר / השרת או מעמד 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 cPanel WHM נכשלה לקבל מידע מכל מצב Apache שגיאה
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept: אסינכרוני AcceptEx נכשל שגיאת התחברות אפאצ 'י
- 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 תיקון שגיאת שרת פנימית בעת גישה נוחה ב-Apache cPanel WebHosting מנהל










































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. המידע שסופק אינו קל לבצע שינויים בשרת.