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 Prevent Symlink Attacks

ad Impact of Symlink - Suppose you own a small hosting company with a Linux Box, & 1337...

How to secure /tmp and /var/tmp

Secure /tmp Edit /etc/fstab by typing the command nano -w /etc/fstab Paste the following...

How to prevent DDoS attack with csf?

First make sure DDOS attack is not from open recursive DNS settings. To check and fix that issue...

Preventing DDOS aplification open resolver attack

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

How to change default SSH port?

Everyone knows 22 is the default SSH port. So it’s always good to change this default port...