I am using Nginx + php-fpm setup
I noticed that I could set fastcgi_param however fastcgi_pass_header
is
not being set. I tried to print $_SERVER in php which has only
fastcgi_params and not fastcgi_pass_headers.
My queries are:
1. Is there any additional configuration parameter needed for
fastcgi_pass_headers? I have set 'underscores_in_headers on;', however
headers I am trying to set don't have underscores. I tried to manipulate
client request headers (through TamperData) it works fine as by default
it
is on.
2. Is there any other way to check (apart from _SERVER) to check if
headers
are set properly while passing to php-fpm?
Any help is appreciated.
I have following configuration:
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
.....
.....
fastcgi_pass_header Authorization;
fastcgi_pass_header Host;
fastcgi_pass_header X-Real-IP;
fastcgi_pass_header X-Forwarded-For;
location block looks like following:
location ~ \.php(.*)$ {
try_files $uri =404;
root /home/myntradomain/public_html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,231973,231973#msg-231973
on 2012-10-18 15:22
on 2012-10-18 16:37
On Thursday 18 October 2012 17:21:58 hsrmmr wrote: > client request headers (through TamperData) it works fine as by default it > is on. > > 2. Is there any other way to check (apart from _SERVER) to check if headers > are set properly while passing to php-fpm? > > Any help is appreciated. It seems that you don't understand what fastcgi_pass_header does. Please, read the documentation: http://nginx.org/r/fastcgi_pass_header wbr, Valentin V. Bartenev -- http://nginx.com/support.html http://nginx.org/en/donation.html
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.