# How to remove PHP X-Powered-By?

**URL:** <https://www.ruby-forum.com/t/how-to-remove-php-x-powered-by/218429>\
**Category:** NGINX\
**Created:** [March 31, 2012, 11:20am UTC](https://www.ruby-forum.com/t/how-to-remove-php-x-powered-by/218429 "2012-03-31T11:20:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 31, 2012, 11:20am UTC](https://www.ruby-forum.com/t/how-to-remove-php-x-powered-by/218429/1 "2012-03-31T11:20:40Z")

</div>

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:

> **[How to remove PHP X-Powered-By?](https://forum.nginx.org/read.php?2,224706,224706#msg-224706)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![etrader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@etrader](https://www.ruby-forum.com/u/etrader)\
**Post date:** [March 31, 2012, 11:37am UTC](https://www.ruby-forum.com/t/how-to-remove-php-x-powered-by/218429/2 "2012-03-31T11:37:21Z")

</div>

In php.ini:

expose\_php = off

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

Andrejs

Posted at Nginx Forum:

> **[Re: How to remove PHP X-Powered-By?](https://forum.nginx.org/read.php?2,224706,224707#msg-224707)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![etrader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@etrader](https://www.ruby-forum.com/u/etrader)\
**Post date:** [March 31, 2012, 11:51am UTC](https://www.ruby-forum.com/t/how-to-remove-php-x-powered-by/218429/3 "2012-03-31T11:51:35Z")

</div>

try “fastcgi\_hide\_header X-Powered-By;”

2012/3/31 locojohn [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![etrader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@etrader](https://www.ruby-forum.com/u/etrader)\
**Post date:** [March 31, 2012, 4:29pm UTC](https://www.ruby-forum.com/t/how-to-remove-php-x-powered-by/218429/4 "2012-03-31T16:29:51Z")

</div>

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:  
[http://forum.nginx.org/read.php?2,224706,224719#msg-224719](http://forum.nginx.org/read.php?2,224706,224719#msg-224719)
