Ngix not picking up the index file.... after upgrade

Igor Sysoev is at rambler-co.ru
Sat Jul 25 11:06:51 MSD 2009


On Sat, Jul 25, 2009 at 02:35:28PM +0800, Shri @ DevLib.Org wrote:

> I have had this working for ever and some how after the upgrade to 0.8.x it 
> seems to have stopped working.
> 
> The following config results in the http://www.hostname.com/classifieds/ 
> not working.
> 
> http://www.hostname.com/classifieds/index.php pulls up the correct file.

Probably, you need:

    location / {
        ...
        index  index.php;
    }


> What am I missing? (Yes, I do need path_info to be set correctly)
> 
>       location /classifieds/(.+\.php)(/.+)$ {
>                set $script $uri;
>                set $path_info "";
>                if ($uri ~ "(.+\.php)(/.+)") {
>                        set $script $1;
>                        set $path_info $2;
>                }
> 
>                fastcgi_param  SCRIPT_FILENAME 
> /site/expat/oct08$fastcgi_script_name;
>                fastcgi_pass   phpbackend;
>                fastcgi_param  PATH_INFO    $path_info;
>                include        fastcgi_params;
>        }
> 
> Help please. :)

Where do you use $script ?

Now you can use:

   location ~ /classifieds/(.+\.php)(/.+)$ {

       fastcgi_split_path_info ^(.+\.php)(/.+);

       fastcgi_param  SCRIPT_FILENAME /site/expat/oct08$fastcgi_script_name;
       fastcgi_param  PATH_INFO    $fastcgi_path_info;

       fastcgi_pass   phpbackend;
       include        fastcgi_params;
   }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list