Knowledgebase

How to Hide Nginx and PHP Version Headers for Security Print

  • 0

Stop exposing exact software version numbers to automated vulnerability scanners.

Step-by-Step Instructions

  1. Add server_tokens off; inside the http block of /etc/nginx/nginx.conf.
  2. Set expose_php = Off inside php.ini.
  3. Reload Nginx and PHP-FPM.
server_tokens off;
# In php.ini:
expose_php = Off

Pro Tip: Verify headers using curl -I https://yourdomain.pk.

Need assistance? Open a ticket in the A1 Client Area or contact our 24/7 NOC Engineering Team on WhatsApp at +1 (406) 229-9597.


Was this answer helpful?

« Back