The web server avoids some unnecessary troubles. You can not display the version information of apache and php. How to hide the PHP
version in the Linux server? Let's learn the Xiaobian to share the Linux server. Hide the PHP
version of the method, I hope to help everyone.
Hide PHP version method in Linux server
By default, expose_php is enabled by default. Turning off the “expose_php” parameter allows php to hide its version information.
[root@centos66 ~]# vi /etc/php.ini
In your php.ini, locate the line containing expose_php and set On to Off:
expose_php = Off
Prior to this, the web server header looked like this:
[root@centos66 ~]# curl -I http://www.ehowstuff.com/HTTP/1.1 200 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, 11 Feb 2015 14:10:43 GMT X-Page-Speed: 1.9.32.2-4321 Cache-Control: max-age=0, no-cache
Change and restart After the web service, php will not display the version in the web service header:
HTTP/1.1 200 OK Server: nginx Date: Wed, 11 Feb 2015 15:38:14 GMT Content-Type: text/Html; charset=UTF-8 Vary: Accept-Encoding X-Pingback: http://www.ehowstuff.com/xmlrpc.php Date: Wed, 11 Feb 2015 14:10:43 GMT X-Page-Speed: 1.9. 32.2-4321 Cache-Control: max-age=0, no-cache
LCTT Annotation: In addition to the version of PHP, the web server Default leaked version number. If you are using an Apache server, please refer to this article to turn off the Apache version display; if you are using an Nginx server, add server_tokens off; in the http section; Please remember to restart the related services.
For the daily use of the Linux system, it is necessary to use the command line to carry out, for ex
Linux is a derivative of Unix operating system , Linux has built-in tools to view the current proce
1. Start/stop/restart of VNC #service vncserver start/stop/restart Close the specific vncserver comm
This period win8.1 Mac OS X 10.9 Mavericks Two operating systems almost simultaneously released, i
Reduce the TIME of too many Linux servers
Linux (centos) SSH installation and setup - macos remote connection
Linux server system command ac command
Linux swap area (swap) is established
Detailed steps for Redis installation under CentOS 6.5
Mandriva Linux Financial Crisis New investors reach out
Seven points of advice on learning Linux
Automotive industry dealing with the Linux operating system
The meaning and difference between Linux chmod 755 and chmod 777
I forgot my computer's user password. How do I crack my password?
What should I do if there is noise in Windows7?
How to set automatic lock screen in win7 system?
How does Win10 speed up the startup of desktop applications Win10 Quick Start Tutorial
Disabled DirectDraw screenshots in Win 7 no longer black screen
Win10 system English version changed to Chinese version of the setting method
How do WinXP systems extract file names in batches?
Win10 mobile version of Build 10080 due to bug cancellation large-scale push