possible fastcgi_params bug or undocumented feature
Rob Schultz
rschultz7 at gmail.com
Fri Mar 21 02:35:33 MSK 2008
Hi,
Today i was configuring nginx to "act" more like apache when using
https (Apache sets the fastcgi paramater HTTPS to on and this is how
phpmyadmin detects if you are using https or not) Well i only wanted
this paramater to be on my https portion of the server so i added it
right below my fastcgi_pass directive.
http {
include /etc/nginx/mime.types;
include /etc/nginx/fastcgi_params;
rest of regular config....
##ssl portion
server {
listen 443;
server_name domain.com www.domain.com;
ssl on;
ssl_certificate /etc/ssl/nginx/server.crt;
ssl_certificate_key /etc/ssl/nginx/server.key;
access_log /var/log/nginx/
domain.com.ssl_access_log main;
error_log /var/log/nginx/
domain.com.ssl_error_log info;
root /var/www/domain.com/htdocs;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:8026;
fastcgi_param HTTPS on;
fastcgi_index index.php;
}
location ~* ^.+\.(jpg|jpeg|gif|png)$ {
access_log off;
expires 30d;
}
}
}
reloaded the configuration file and hit refresh on a php page
displaying phpinfo() and i get the "No Input file". So after playing
around i ended up having to add the include directive in my location ~
\.php$ section like so
location ~ \.php$ {
fastcgi_pass 127.0.0.1:8132;
include /etc/nginx/fastcgi_params;
fastcgi_param HTTPS on;
fastcgi_index index.php;
}
So it is looking like adding a fastcgi_param directive is clearing out
the http section for them.
Also the English wiki states "Directives not set are inherited from
the outer level. " so that is why i am thinking this is a bug.
I am currently using the 0.6.28 and noticed a new release but by the
changelog doesn't seem like anything changed in the fastcgi module.
Thanks,
Rob Schultz
More information about the nginx
mailing list