How to hide your PHP version information?

Like Apache, it is not good to expose your PHP information to the public. Please follow the below steps to hide it from the public.

Find your main PHP configuration file.

php -i | grep php.ini

You will get the location of your mail php.ini file from this. Edit the file and you can see the below lines.

vim /etc/php.ini
---
expose_php = on
---

Edit it as follows.

expose_php = off

Restart Apache

/etc/init.d/httpd restart

You have disabled PHP version information.

Was this answer helpful?

 Print this Article

Also Read

How to Password Protect a Directory

This tutorial will teach how to password protect a directory. Password protecting a directory...

How to Secure WHM/cPanel

Login to WHM using root username/passwdhttp://serverip:2086 or http://serverip/whm WHM –...

How to disable ping request?

If you are looking for the  steps to disable ping. Please find the steps below. Run the...

How to Prevent DDOS with CSF

You just need to configure two csf directives, thats it. The two directives are PORTFLOOD and...

How to Secure PHP from php.ini

PHP's default configuration file, php.ini (usually found in /etc/php.ini on most Linux systems)...