NGINXUbuntu

Hide PHP-FPM Version on NGINX

Hiding PHP-FPM version on NGINX server

Check PHP-FPM version on NGINX HTTP response

$ curl -I localhost/index.php
HTTP/1.1 200 OK
Date: Sat, 12 Aug 2017 14:07:54 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.5.9-1ubuntu4.22

How to hide PHP-FPM Version (X-Powered-By:) on NGINX

vim /etc/php5/fpm/php.ini

expose_php = Off

Restart php5-fpm service

/etc/init.d/php5-fpm restart

Check the result

$ curl -I localhost/index.php
HTTP/1.1 200 OK
Date: Sat, 12 Aug 2017 14:08:30 GMT
Content-Type: text/html
Connection: keep-alive

Speaking of web server security, you might be interested in exploring the concept of web servers and how they function. Additionally, understanding PHP and its role in web development can provide valuable insights into why it’s essential to manage versions properly. Lastly, you might want to read about NGINX, a popular web server that pairs exceptionally well with PHP-FPM for efficient performance.

Hi, I’m Sysadmin.ID

Leave a Reply

Your email address will not be published. Required fields are marked *