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