Tested on Ubuntu 26.04 LTS (Resolute Raccoon), nginx 1.28.3-2ubuntu1.10
Config:
```
server {
listen 80 default_server;
location ~ ^/MAAS/machine-resources/(.*)$ {
root /usr/share/maas/machine-resources;
try_files /$1 =404;
}
}
```
Result: 200 - the issue is resolved
Demo:
```
mkdir -p /usr/share/maas/machine-resources
echo "questo-e-amd64" > /usr/share/maas/machine-resources/amd64
```
```
$ curl -v http://10.53.157.12/MAAS/machine-resources/amd64
* Trying 10.53.157.12:80...
* Established connection to 10.53.157.12 (10.53.157.12 port 80) from
10.53.157.1 port 58096
* using HTTP/1.x
> GET /MAAS/machine-resources/amd64 HTTP/1.1
> Host: 10.53.157.12
> User-Agent: curl/8.18.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Server: nginx/1.28.3 (Ubuntu)
< Date: Fri, 28 Aug 2026 16:04:15 GMT
< Content-Type: application/octet-stream
< Content-Length: 15
< Last-Modified: Fri, 28 Aug 2026 16:03:24 GMT
< Connection: keep-alive
< ETag: "6a91b14c-f"
< Accept-Ranges: bytes
<
questo-e-amd64
* Connection #0 to host 10.53.157.12:80 left intact
```
Apt Cache Policy
`apt-cache policy nginx nginx-core`
```
nginx:
Installed: 1.28.3-2ubuntu1.10
Candidate: 1.28.3-2ubuntu1.10
Version table:
*** 1.28.3-2ubuntu1.10 500
500 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64
Packages
500 http://security.ubuntu.com/ubuntu resolute-security/main amd64
Packages
100 /var/lib/dpkg/status
1.28.3-2ubuntu1 500
500 http://archive.ubuntu.com/ubuntu resolute/main amd64 Packages
nginx-core:
Installed: (none)
Candidate: 1.28.3-2ubuntu1.10
Version table:
1.28.3-2ubuntu1.10 500
500 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64
Packages
500 http://security.ubuntu.com/ubuntu resolute-security/main amd64
Packages
1.28.3-2ubuntu1 500
500 http://archive.ubuntu.com/ubuntu resolute/main amd64 Packages
```
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164581
Title:
$1 in try_files returns wrong data
To manage notifications about this bug go to:
https://bugs.launchpad.net/nginx/+bug/2164581/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs