Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the proxy_hide_header X-Powered-By directive, but it doesn't work. I had to use the expose_php option in php.ini.

Is there anything different between the proxy_hide_header and the expose_php option?

Here is the configuration

server {
    listen 80;
    root /data/blog/;
    index index.php index.html index.htm;
    error_page 500 502 503 504  /50x.html;
    proxy_hide_header X-Powered-By;        # i put it here, not working

    location ~ ^/.+\.php(\/.*)?$ {
        proxy_hide_header X-Powered-By ;   # still not working
share|improve this question
I don't see why proxy_hide_header shouldn't work. Maybe there was a problem with your configuration? – Oliver Salzburg Jun 17 '13 at 17:05
ths! you are right . I use the wrong directive . I shoud use fastcgi_hide_header instead :) – ailms Jun 18 '13 at 3:41

I sholud use fastcgi_hide_header instead :)

because I use the nginx + fastcgi + php model , not nginx + php model

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.