PortGate

Blueprints · Laravel & PHP

Beginner 5 min · Linux

Hide the PHP version header

Stages expose_php = Off. Hiding the header is not a patch. Upgrade PHP as well.

Baked-in protections

Step 1 · ini

PHP ini snippet

/root/portgate-blueprints/expose-php.ini

Copy into the FPM conf.d directory for the version you run.

expose_php = Off

Step 2 · bash

Read-only check

/root/portgate-blueprints/php-expose-check.sh

Prints status. It does not change the service.

#!/bin/sh
set -eu
php -i | grep -E 'expose_php|PHP Version' || echo "php is not on PATH."