Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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;
    server_name .ailms.me;
    root /data/blog/ailms.me/;
    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
1  
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

1 Answer 1

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

 
discard

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.