Hides the Apache version number and PHP x-powered-by information from the HTTP header information returned

Source: Internet
Author: User

By default, many Apache installations display version numbers and operating system versions, and even show what Apache modules are installed on the server. This information can be used by hackers, and hackers can also learn that many of the settings on the server you are configuring are the default states.

There are two statements that you need to add to your httpd.conf file:
serversignature Off
servertokens Prod

serversignature This parameter setting Appears at the bottom of a page like 404 pages, directory listings, etc. generated by Apache,
three options on| Off| The emai is mainly switched off and is recommended for off.

Servertokens This parameter sets the Apache version information returned by the HTTP header, to be safe, to display as little information as possible, and to set it off, the available values and meanings are as follows (the information displayed gradually increases):

Prod: Software name only, For example: Apache
Major: Includes the major version number, for example: APACHE/2
Minor: Include minor version number, for example: apache/2.0
Min: Full version number of Apache only, for example: apache/2.0.54
OS: Includes operating system type, for example: apache/2.0.54 (Unix)
full: Includes Apache supported module and module version number, for example: apache/2.0.54 (Unix)   mod_ssl/2.0.54 openssl/0.9.7g

Remove x-powered-by only need to modify php.ini
expose_php = Off


If you need to customize headers, refer to the official website Mod_ Headers Module

Apache module mod_headers

http://httpd.apache.org/docs/2.0/mod/mod_headers.html

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.