Hide PHP version in the header (X-Powered-By)

categories:

Edit /etc/php.ini (under RHEL/CentOS) and set : expose_php = Off

Before : $ curl -I blog.wains.be HTTP/1.0 200 OK Date: Sat, 03 Mar 2007 14:55:17 GMT Server: Apache X-Powered-By: PHP/4.x.x X-Pingback: http://blog.wains.be/xmlrpc.php Content-Type: text/html; charset=UTF-8 X-Cache: MISS from localhost Connection: close

After : $ curl -I blog.wains.be HTTP/1.0 200 OK Date: Sat, 03 Mar 2007 15:11:36 GMT Server: Apache X-Pingback: http://blog.wains.be/xmlrpc.php Content-Type: text/html; charset=UTF-8 X-Cache: MISS from localhost Connection: close




Thanks for reading this post!


If you found an issue in this article, you can create an issue on Github.

If you have a comment or question, please drop me a line below!