Welcome! Log In Create A New Profile

Advanced

try_files and index

June 25, 2012 07:00PM
Why is it my first configuration returns 403 while my second configuration returns 404?

I looked into logs and it seems my first configuration triggers the index module which is set to the default index.html, finds nothing and returns 403. Why isn't the =404 triggered? And why is the index module triggered at all?

server {
root /var;
try_files $uri =404;
location / {
}
}

My second configuration works more like I expected; but then, why isn't the index module triggered as well? Does try_files disable the index module somehow?

server {
root /var;
location / {
try_files $uri =404;
}
}

Can someone explain how nginx goes to decide what to do?
Thank you
Subject Author Posted

try_files and index

whiskybar June 25, 2012 07:00PM

Re: try_files and index

Edho Arief June 25, 2012 09:48PM

Re: try_files and index

whiskybar June 26, 2012 03:18AM

Re: try_files and index

Edho Arief June 26, 2012 03:24AM

Re: try_files and index

shahzaib mushtaq June 26, 2012 03:34AM

Re: try_files and index

Maxim Dounin June 26, 2012 03:32AM

Re: try_files and index

whiskybar June 26, 2012 03:47AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready