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

25 Most Frequently Used Linux IPTables Rules Examples

In the below examples we are using ETH0 as network interface, however if you are using our...

How to disable all Apache header information?

Follow the below steps to disable Apache header information. Edit your mail Apache configuration...

How to install mod_security on Apache 2.x

What is mod_security or modsecurity? ModSecurity is an open source intrusion detection and...

Installing and configuring Spamassassin on CentOS

If you run your own mail server you'll want it to run spam filtering software to reduce the...

Prevent DDoS by using mod_evasive

“mod_evasive” is an evasive maneuvers module for Apache to provide evasive action in...