I have a very simple nginx-setup with two location-blocks
server {
listen 80 default_server;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ =404;
}
location /more {
root /usr/share/nginx/more;
index index.html index.htm;
try_files $uri $uri/ =404;
}
}
The only thing it should do is to serve files from /usr/share/nginx/html for the first location, and files from /usr/share/nginx/more for the second location.
The first location works as expected, but the second one keeps returning 404.
This problem is soo simple that it doesn't turn up in the documentation, or in other questions. What should I check first?
For the record: /usr/share/nginx/more exists and contains just one file, namely index.html
The only "difference" I find between the more and the html folder in /usr/share/nginx are the permissions:
drwxr-xr-x 11 root root 4096 May 25 00:01 html
drwxr-xr-x 2 root root 4096 May 25 07:41 more
I'm aware that my setup repeats unnecessary lines, but I guess that's not the issue now.