How to remove PHP X-Powered-By?

I add custom X-Powered-By with “add_header X-Powered-By custom;”

However, when serving PHP fastcgi in the location, PHP X-Powered-By will
also be added to make the X-Powered-By as

X-Powered-By: PHP/5.3.3-1ubuntu9.10 custom

How can I totally remove PHP X-Powered-By to have my own custom one
only?

Posted at Nginx Forum:

In php.ini:

expose_php = off

Actually, you could do some googling before asking a question.

Andrejs

Posted at Nginx Forum:

try “fastcgi_hide_header X-Powered-By;”

2012/3/31 locojohn [email protected]

Thanks Andrejs! Sorry, it was my failure!

locojohn Wrote:

In php.ini:

expose_php = off

Actually, you could do some googling before asking
a question.

Andrejs

Posted at Nginx Forum: