How to remove PHP version from the X-Powered-By HTTP header on Plesk server?

Follow

Comments

2 comments

  • Avatar
    Arvind Kumar Madhukar

    Hey !

     

    I have followed the same steps but it wasn't working, in order to accomplish the same, i have manually edit the each fpm php.ini file and reload the same.

    Example For X.X

    /opt/plesk/php/X.X/etc/php.ini

    change expose_php = On to expose_php = Off

    where X.X is my php versions.

    0
    Comment actions Permalink
  • Avatar
    Maxim Krasikov

    Hello @Arvind Kumar Madhukar,

    Both approaches are correct.
    If expose_php is set to Off directly in php.ini or included as php.d/hideheader.ini,  PHP version displaying is disabled in these cases.

    It can be checked using a query like the following:
    # /opt/plesk/php/X.X/bin/php -i | grep expose_php
    expose_php => Off => Off

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request