Welcome! Log In Create A New Profile

Advanced

Re: -f $request_filename

April 20, 2010 01:28AM
On Mon, Apr 19, 2010 at 07:57:54PM +0200, Tomasz Pajor wrote:

>
> > A generic method:
> >
> > location / {
> > root /vhosts/default/test;
> > try_files $uri $uri/ @fallback;
> > }
> >
> > location @fallback {
> > fastcgi_pass unix:/var/run/spawn-fcgi.sock;
> > ...
> > }
> >
> This seems to work, just one question.
> The fastcgi application is Zend based, but i get an
>
> 403 forbiddened when try_files is:
> $uri $uri/ @fallback
>
> when i set it up to:
> $uri @fallback
>
> it seems to work, why is that?

When you request "/", "try_files $uri/" founds that there is
a directory "/vhosts/default/test/" and nginx uses "location /"
for handling the request. Then the directive "index" tries to
find its default value "index.html". If it can not find it, this leads
to 403.

Probably, you need

location / {
root /vhosts/default/test;
try_files $uri $uri/ @fallback;
index index.php;
}


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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

-f $request_filename

Tomasz Pajor April 19, 2010 08:58AM

Re: -f $request_filename

edogawaconan April 19, 2010 09:12AM

Re: -f $request_filename

Tomasz Pajor April 19, 2010 11:32AM

Re: -f $request_filename

Maxim Dounin April 19, 2010 10:10AM

Re: -f $request_filename

Tomasz Pajor April 19, 2010 11:30AM

Re: -f $request_filename

Igor Sysoev April 19, 2010 01:20PM

Re: -f $request_filename

Tomasz Pajor April 19, 2010 02:04PM

Re: -f $request_filename

edogawaconan April 19, 2010 10:34PM

Re: -f $request_filename

Igor Sysoev April 20, 2010 01:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready