Hide Apache version and other sensitive information in ubuntu

Source: Internet
Author: User
By default, if the Apache host encounters an error page, in addition to prompting an error, it will also display your machine software environment, such as your Apache version, PHP version ...... Is this a bit insecure?

By default, if the Apache host encounters an error page, in addition to prompting an error, it will also display your machine software environment, such as your Apache version, PHP version ...... Is this a bit insecure?
vim /etc/apache2/conf.d/security
ServerTokens Prod
ServerSignature Off

In this way, the system and apache versions are not displayed, which is relatively secure.

ServerTokens is used to set the Apache version information returned by the http header. The following parameters are generally included. The meanings and functions of these parameters are described as follows.

Prod: only the software name, such as apache.

Major: includes the main version number, such as apache/2.

Minor: contains the Minor version number, for example, apache/2.0.

Min: only the complete Apache version number, for example, apache/2.0.54.

OS: includes the operating system type, such as apache/2.0.54 (Unix ).

Full: Includes modules and module versions supported by Apache, such as Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7g.

ServerSignature
Controls how information is displayed in the footer of a page (error message, mod_proxy ftp directory listing, etc.) generated by the system.

It can be controlled in the global settings file or through the. htaccess file.
The default value is "off" (ServerSignature Off). Some Linux releases may open this valve. For example, Debian sets this valve to open by default on the default virtual host.
The threshold value of the global valve is overwritten by the threshold value in the configuration file of the virtual host or directory unit.

The available thresholds are as follows:
Off (default): No footer information is output (like Apache1.2 and earlier versions, used for confusion)
On: Output a line about the version number and the ServerName of the running Virtual Host (Versions later than 2.0.44, whether ServerTokens outputs the version number)
EMail: create a "mailto" sent to ServerAdmin"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.