strange url resolution

Bug #2004191 reported by ivo welch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nginx
Invalid
Undecided
Unassigned

Bug Description

I installed ubuntu 22.04.1 LTS just now afresh, then nginx. nginx version: nginx/1.18.0 (Ubuntu)
. the server is running at http://164.67.176.22/ .

the server config file is default, with addition only of /wth:

```
server {
 listen 80 default_server;
 listen [::]:80 default_server;

 root /var/www/html;

 index index.html index.htm index.nginx-debian.html;

 server_name _;

 location / {
  try_files $uri $uri/ =404;
 }

 location /wth {
   root /var/www/fcgi-bin/;
   index wth-root.html;
 }
}

```

server was restarted, /var/www/fcgi-bin/wth-root.html is properly accessible.

now try /wth, which nginx should resolve to /var/www/fcgi-bin/wth-root.html. However, this causes a 404 error.

now try /wth-root.html, which nginx should not resolve to /var/www/fcgi-bin/wth-root.html, but does resolve.

Revision history for this message
Thomas Ward (teward) wrote :

This looks like a support request not a bug. Please email <email address hidden> for support requests or post on Ask Ubuntu or similar sites for support.

Changed in nginx:
status: New → Invalid
Revision history for this message
ivo welch (ivo-welch) wrote :

I posted. I asked. I even paid. It makes no sense to anyone. I spent another 5 hours experimenting with this and posting the simplest version at http://164.67.176.22/ , half a page, with full details. at its simplest, it asks why

 location /wth {
   root /var/www/fcgi-bin/;
   index wth-root.html;
 }

does not resolve '/wth' (but incidentally does resolve '/wth-root.html', though not '/wth-root').

Maybe this is a good candidate for the FAQ, which is why I dared to post a comment...

Revision history for this message
Thomas Ward (teward) wrote :

This group is NOT NGINX Upstream support and has nothing to do with the NGINX FAQ.

I suggest you start by looking into the FAQ yourself for Pitfalls and that you probably need try_files but this is not a support medium.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.