Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Cải thiện Apache Web Server Bảo mật: Sử dụng ServerTokens và ServerSignature vào Vô hiệu hoá Tiêu đề

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. Khi máy chủ web Apache HTTPD tạo ra bất kỳ trang web hoặc các trang báo lỗi, một số thông tin quan trọng về các phiên bản và các thông tin chi tiết triển khai thực hiện trên hệ thống được hiển thị trong năm trang web phục vụ tiêu đề. For example, the information text may be like this: Ví dụ, các thông tin văn bản có thể được như thế này:

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 Máy chủ: 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 Máy chủ: Apache/2.0.53 (Ubuntu) PHP/4.3.10-10ubuntu4 Server tại xx.xx.xx.xx Cảng 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. Dòng máy phục vụ trong các tiêu đề ra quan trọng và các phiên bản biến thể thông tin về hệ điều hành Linux và Apache được sử dụng phần mềm trên máy tính, gián tiếp thị có thể bảo vệ được lỗ tồn tại cho tin tặc, hoặc ít nhất là làm cho độc hại attackers dễ dàng hơn để nhận biết hệ thống của bạn cho sẵn sàng tấn công điểm.

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. Để đảm bảo rằng các máy chủ web Apache HTTP không quảng bá tin nhắn này tới toàn thế giới công khai và có thể sửa chữa vấn đề an ninh, sửa đổi các chỉ thị hai ServerTokesServerSignature trong tập tin cấu hình httpd.conf.

  1. Login as root user or perform a sudo to the web server. Đăng nhập Tên đăng nhập như là người chủ sử dụng hoặc thực hiện một sudo vào máy chủ trang web.
  2. Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. Đã giải quyết và chỉnh sửa httpd.conf hoặc apache2.conf (trong Apache 2) với vi hoặc các trình soạn thảo văn bản. 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. Các Apache cấu hình bình thường nằm trong / etc / httpd / conf / hoặc / etc/apache2 / hoặc / etc / apache / (cho Apache1.3) mà UNIX tuỳ thuộc vào bạn đang sử dụng.
  3. Locate the line with ServerTokens . Xác định vị trí cho phù hợp với ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter. Bạn có thể thực hiện việc tìm kiếm bằng cách gõ "/ ServerTokes" và nhấn Enter.
  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). Trong 1,3 Apache, bạn sẽ có khả năng để xem một dòng bắt đầu với đầy đủ ServerTokes # Trong trường hợp này, loại bỏ, hoặc xóa các ký tự # (bằng cách nhấn phím 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 . Họ cũng thay đổi để trở thành Prod (nhấn phím R để thay thế một trong những ký tự, hoặc R để thay thế nhiều ký tự), để trở thành dòng ServerTokens Prod. In Apache 2.0 or 2.2, the line normally does not exist. Trong Apache 2,0 hoặc 2,2, dòng thông thường không tồn tại. So the search will fail. Vì vậy, việc tìm kiếm sẽ không thành công. In this case, go to the bottom of config file, and add the new line with the following text. Trong trường hợp này, hãy vào dưới cùng của tập tin cấu hình, và thêm mới, phù hợp với văn bản sau. You can add new line by pressing o key. Bạn có thể thêm dòng mới bằng cách nhấn phím o.

    ServerTokens Prod ServerTokens Prod

  5. Next, search for ServerSignature. Kế tiếp, tìm kiếm các ServerSignature. In Apache13, the line should just above the line of ServerTokens. Trong Apache13, dòng nên chỉ ở trên các dòng của 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. Hiệu chỉnh dòng để nó trông như thế này, và trong Apache2 mà không đã có dòng này, thêm vào ở mới.

    ServerSignature Off ServerSignature Tắt

  6. By now the Apache configuration file should have this two directives set as below: Đến nay các tập tin cấu hình của Apache phải có hai chỉ thị này đặt như sau:

    ServerSignature Off ServerSignature Tắt
    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. Dòng đầu tiên "ServerSignature Off" Apache không được hướng dẫn để hiển thị một trailing dưới chân dòng máy chủ-tạo ra các tài liệu (thông báo lỗi, mod_proxy ftp danh sách thư mục, mod_info sản lượng, và vv) mà máy chủ sẽ hiển thị số phiên bản, tên_máy_phục_vụ phục vụ của các máy chủ ảo, gửi thư điện tử thiết lập, và tạo ra một "mailto:" tham chiếu đến ServerAdmin của các tài liệu tham chiếu.

    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. Dòng thứ hai "ServerTokens Prod" configures Apache Apache để trả lại chỉ là sản phẩm phục vụ trong các phản ứng rất tiêu đề trên trang yêu cầu, suppressing hệ điều hành, phiên bản lớn và nhỏ, thông tin.

  7. Save and close the config file by pressing Shift-Colon, and then type wq keys, and hit Enter. Lưu và đóng tập tin cấu hình bằng cách nhấn Shift-chấm, và sau đó nhập WQ phím, và bấm phím Enter.
  8. Restart Apache. Khởi động lại Apache. Typical command is service httpd restart or /etc/init.d/apache2 restart . Công trình tiêu biểu là lệnh khởi động lại dịch vụ httpd hoặc / etc/init.d/apache2 khởi động lại.
  9. Now, you will get only the Apache in the server response header: Bây giờ, bạn sẽ nhận được chỉ có Apache trong máy chủ đáp ứng tiêu đề:

    Server: Apache Máy chủ: Apache

IMPORTANT : The page is machine translated and provided "as is" without warranty. Lưu ý: Các trang web là máy tính dịch và cung cấp "như là" mà không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể là khó hiểu. Please refer to Xin vui lòng tham khảo original English article Tiếng Anh bản gốc bài viết whenever possible. bất cứ khi nào có thể.


2 Responses to “Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header” 2 hồi đáp tới "Cải thiện Apache Web Server Bảo mật: Sử dụng ServerTokens và ServerSignature vào Vô hiệu hoá Tiêu đề"

  1. Leonid Leonid
    November 17th, 2008 14:58 17 tháng mười một, 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. Nhiều người cảm ơn, tôi đã được sử dụng ServerSignature Off cho thời gian dài bây giờ, nhưng điều thứ hai là khá mới.

    Do you know how you can actually edit the serversignature so you will decide which information to send in case of an error? Bạn có biết làm thế nào bạn có thể thực sự hiệu chỉnh serversignature, do đó bạn sẽ quyết định có thông tin để gửi, trong trường hợp của một lỗi?

  2. Nilesh Nilesh
    October 24th, 2008 17:00 24 tháng mười, 2008 17:00
    1 1

    It's really useful article to secure your dedicated web servers. Nó thực sự hữu ích của bài viết của bạn dành riêng để đảm bảo các máy chủ web. The information provided is easy to make changes on the server. Các thông tin cung cấp được dễ dàng thực hiện các thay đổi trên máy chủ.

Leave a Reply Để lại một trả lời

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> Bạn có thể sử dụng các thẻ:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Đăng ký nhận xét tính năng đã bị vô hiệu hoá. To receive notification of latest comments posted, subscribe to Để nhận được thông báo về ý kiến mới nhất được đăng, đăng ký với My Digital Life Comments RSS feed Cuộc sống kỹ thuật số Bình luận của tôi nguồn cấp dữ liệu RSS or hoặc register to receive đăng ký để nhận được new comments in daily email digest. Các ý kiến mới trong thư điện tử tiêu hàng ngày.
Custom Search

New Articles Bài viết mới

Incoming Search Terms for the Article Tìm kiếm các điều khoản cho các Điều

apache ServerTokens apache ServerTokens - -- servertokens apache servertokens apache - -- apache2 servertoken apache2 servertoken - -- apache disable server header apache đầu vô hiệu hoá máy chủ - -- apache2 server header apache2 vụ tiêu đề - -- Apache server tokens Máy chủ Apache thẻ - -- turn off server header apache tắt máy chủ đầu apache - -- servertokens footer servertokens chân - -- apache disable header 404 apache vô hiệu hóa phần đầu 404 - -- disable serverinfo in apache vô hiệu hóa serverinfo trong apache - -- disable ServerSignature apache vô hiệu hóa ServerSignature apache - -- disable ServerTokens vô hiệu hóa ServerTokens - -- http header remove Server http đầu loại bỏ Server - -- apache2 servertokens apache2 servertokens - -- apache2 servertokens prod apache2 servertokens đâm - -- apache turn off signature apache tắt chữ ký - -- http header server: Apache http đầu máy chủ: Apache - -- Remove Server: Apache from headers Hủy bỏ Server: Apache từ các tiêu đề - -- ServerTokens Product Only Chỉ có sản phẩm ServerTokens - -- absence ServerTokens apache2.conf vắng mặt ServerTokens apache2.conf - -- apache servertokens off apache servertokens off - -- disable put apache vô hiệu hóa đặt apache - -- header server modify đầu máy phục vụ sửa đổi - -- how to disable apache headers làm thế nào để vô hiệu hóa các tiêu đề apache - -- +apache +ServerToken + apache + ServerToken - -- apache custom server signature apache tùy chỉnh chữ ký của máy chủ - -- apache2 disable server header apache2 đầu vô hiệu hóa máy chủ - -- apache conf ServerToken apache conf ServerToken - -- apache ServerTokens httpd.conf apache ServerTokens httpd.conf - -- appache ServerSignature mail appache ServerSignature thư - -- appache ServerTokens appache ServerTokens - -- disable server signature vô hiệu hóa máy chủ chữ ký - -- how to eliminate apache version on error page làm thế nào để loại bỏ apache phiên bản trên trang báo lỗi - -- how to disable apache version info làm thế nào để vô hiệu hóa apache phiên bản thông tin - -- php server signature php vụ chữ ký - -- server signature off in apache máy chủ chữ ký tắt trong apache - -- servertokens prod servertokens đâm - -- ServerTokens httpd.conf ServerTokens httpd.conf - -- ServerSignature httpd.conf ServerSignature httpd.conf - -- ServerTokens custom ServerTokens tùy chỉnh - -- apache footer security apache chân an ninh - -- hide ServerTokens apache ẩn ServerTokens apache - -- how to modify apache ServerTokens in ubuntu làm thế nào để sửa đổi apache ServerTokens trong Ubuntu - -- servertokens apache2 servertokens apache2 - --