fastcgi_param in server context does not work

Michael Shadle mike503 at gmail.com
Tue Sep 22 19:26:08 MSD 2009


it does work but you overwrite it in your location, i believe.

any of the "array" settings can't be mixed or the most local copy seems to win.

On Tue, Sep 22, 2009 at 8:17 AM, Tomasz Pajor <nikon at puffy.pl> wrote:
> When I set fastcgi_param in server context it is not set, if in location it
> is set.
> Wiki says it should work in http, server, location context.
>
> server {
>   listen 80;
>   server_name .landingpage.dev;
>   access_log off;
>   error_log /var/log/nginx/landingpage.log;
>
>   root /vhosts/landingpage/public;
>   charset utf-8;
>
>   fastcgi_index index.php;
>   fastcgi_param SITE my_site;
>
>   location / {
>       try_files $uri $uri/ @fallback;
>       fastcgi_pass unix:/var/run/spawn-fcgi.sock;
>       fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
>       #fastcgi_param SITE my_site;
>       include fastcgi_params;
>   }
>
>   location @fallback {
>       fastcgi_pass unix:/var/run/spawn-fcgi.sock;
>       fastcgi_param SCRIPT_FILENAME $document_root/index.php;
>       #fastcgi_param SITE my_site;
>       include fastcgi_params;
>   }
> }
>
>





More information about the nginx mailing list