You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
2.11.8: php_fastcgi returns 404 for directory URLs ending in / (index.php not served) #8353
After upgrading from 2.11.7 to 2.11.8 (Debian package from the Cloudsmith repo, Ubuntu 24.04), every directory URL that ends in / returns 404 on a php_fastcgi site, instead of running that directory's index.php. Requests that name the .php file still work, and so does /. Rolling back to 2.11.7 fixes it.
Minimal Caddyfile:
{
admin off
auto_https off
}
http://localhost:8080 {
root * /srv/www
php_fastcgi 127.0.0.1:9000
file_server
}
So the canonical-path redirect sends /surveys to /surveys/, which then 404s. It looks related to #8326 ("a try_files / file candidate ending in / only matches a directory"): for /surveys/, the first php_fastcgi candidate {path} now matches the directory itself, the rewrite leaves the path at /surveys/, it isn't *.php, and file_server returns 404 with no index.html there. That's a guess from the behavior. I haven't read the code.
The same thing happens with a full config (php_fastcgi unix//run/php/php8.3-fpm.sock, PHP 8.3 FPM). On our REDCap site it broke public survey links (/surveys/?s=<hash>). For now we're held at 2.11.7. A workaround that worked on both versions is an explicit rewrite before php_fastcgi:
If AI was used, describe the extent to which it was used.
Claude (Anthropic) ran the version comparison against a minimal config and a stub FastCGI backend, and drafted this issue. I reviewed the results and the text.
Version: v2.11.8 h1:E2pv1BoZ5bJaWqFkU6QvLa21iGAX8bDzlEQG4dDQ/Vc= (repro steps: the Caddyfile and table above, then curl -i http://localhost:8080/surveys/)
Activity
francislavoie commentedon Nov 4, 2026
FYI @dunglas
dunglas commentedon Nov 4, 2026
Fixed by #8352 (I checked with a real project)
Sorry about that.