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!


Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!