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

Scan your Linux system with Clam AntiVirus/ClamAV.Installation Guide

ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware...

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 Block Traffic by Country in the CSF Firewall?

One of the most-requested features on cPanel servers is the ability to manage and filter traffic...

Secure system using "mod_security".

Follow the below steps to install “mod_security”. ModSecurity supplies an array of...

How To Use The IP Deny Manager

This tutorial will teach you how to use the IP Deny Manager to block access to your web site from...