Possible fastcgi_params bug or undocumented feature

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 S.

The 2nd fastcgi_pass was a miss type. It is the same port as the other.

Rob S.

Hello!

On Thu, Mar 20, 2008 at 06:35:33PM -0500, Rob S. wrote:

rest of regular config…
access_log /var/log/nginx/domain.com.ssl_access_log
}
up having to add the include directive in my location ~.php$ section like
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.

No, it’s by design and clearly documented at least in russian
docs. Probably English wiki needs clarification here.

Basically, when you set array directive at certan level this
clears everything inherited from upper levels for this array.
This applies to other array directives as well (proxy_add_header,
access_log, etc.).

Maxim D.

Ok thanks. I will adjust the English wiki if i can.

Now just trying to think how to word this. Since this isnt right with
double
negative in the sentance? Anyone have a better suggestion for the text?

It is possible to use strings, variables and their combination as
values.
Directives not set are inherited from the outer level only when there is
no
Directives set in current level.