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

Is my server hacked? Lets check it with rootkit hunter

RookHit Hunter is a command-line utility that will search your machine for...

How to install Linux Maldet Anti Sheller

This guide will walk you through installing LMD (Linux Malware Detect) on your VPS/Dedicated...

what is eXploit Scanner (cxs)

eXploit Scanner (cxs) is a new tool from Configserver that performs active scanning of files as...

How to Secure WHM/cPanel

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

Preventing DDOS aplification open resolver attack

DDOS Attack  by open DNS resolver: Open dns resolver provides name resolution to any network...