Tip: How PHP versions are hidden in Linux servers

Source: Internet
Author: User

Typically, most of the default settings for installing Web server Software are information leaks, one of which is PHP. PHP is one of the most popular service-side HTML embedded languages today. And in today's challenging era, there are many hackers who try to discover vulnerabilities on your server. As a result, an article on the Ehowstuff Web site briefly describes how to hide PHP information from Linux servers.

  

By default, expose_php is on by default, and the "expose_php" parameter is turned off to allow PHP to hide its version information.

[Email protected] ~]# Vi/etc/php.ini

On the php.ini, locate the line containing the expose_php and set the on to OFF:

expose_php = Off

Before changing the settings, the Web server header looks like this:

[Email protected] ~]# curl-i http://www.ehowstuff.com/

http/1.1 OK Server:nginx content-type:text/html; Charset=utf-8 vary:accept-encoding x-powered-by:php/5.3.3 x-pingback:http://www.ehowstuff.com/xmlrpc.php date:wed, 14:10:43 GMT x-page-speed:1.9.32.2-4321 cache-control:max-age=0, No-cache

After you change and restart the Web service, PHP does not display the version in the Web Service header:

http/1.1 OK Server:nginx date:wed, one 15:38:14 GMT content-type:text/html;   Charset=utf-8 vary:accept-encoding x-pingback:http://www.ehowstuff.com/xmlrpc.php date:wed, 14:10:43 GMT x-page-speed:1.9.32.2-4321 cache-control:max-age=0, No-cache

Although there is a certain information risk, but PHP as one of the powerful language of web development, with open source code, cross-platform strong, fast development, high efficiency, object-oriented, professional focus and many other advantages, so that the PHP development framework also makes the program development simple and effective.

Personal Print http://www.biyinjishi.com/products/a65/
Photo Print http://www.biyinjishi.com/products/a65-b6510/
Photo Stamping http://www.biyinjishi.com/products/a65-b6510/
Print Photo http://www.biyinjishi.com/products/a65-b6510/d100117/
Digital Photo http://www.biyinjishi.com/products/a65-b6510/d100118/
Lomo card http://www.biyinjishi.com/products/a65-b6510/d100119/
postcard http://www.biyinjishi.com/products/a65-b6510/d100120/
jigsaw Puzzle Poster http://www.biyinjishi.com/products/a65-b6510/d100121/
Photo Wall http://www.biyinjishi.com/products/a65-b6510/d100122/
Calendar http://www.biyinjishi.com/products/a65-b6520/d100122
Calendar http://www.biyinjishi.com/products/a65-b6520/d100122
General Calendar http://www.biyinjishi.com/products/a65-b6520/d100124/
Creative Calendar http://www.biyinjishi.com/products/a65-b6520/d100125/
high-end desk calendar http://www.biyinjishi.com/products/a65-b6520/d100126/
http://www.biyinjishi.com/products/a65-b6520/d100127/Calendar of the month
Single-sheet calendar http://www.biyinjishi.com/products/a65-b6520/d100128/
album http://www.biyinjishi.com/products/a65-b6530/d100128
Lite Photo book http://www.biyinjishi.com/products/a65-b6530/d100130

Tip: How to hide the PHP version in a Linux server

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.