caddy/modules/caddyhttp/reverseproxy/fastcgi
Kévin Dunglas 8822b60863
fastcgi: rewrite to index.php only if it exists (#8372)
php_fastcgi used first_exist_fallback, which since v2.11.8 matches its final entry even when the file is absent. On a site without index.php, "/", directories with an index.html and missing files were all rewritten to the missing index.php, so file_server never served them.

php_fastcgi now uses first_exist, as v2.11.7 effectively did since globbing skipped absent files. Explicitly configured first_exist_fallback keeps its semantics. The transport normalizes the path itself, so the dot-segment protection doesn't depend on this rewrite.

Fixes #8367
2026-11-08 22:04:20 +00:00
..
caddyfile.go fastcgi: rewrite to index.php only if it exists (#8372) 2026-11-08 22:04:20 +00:00
client.go fastcgi: stop response bodies at the declared Content-Length (#8212) 2026-10-26 19:32:45 +00:00
client_test.go use math/rand/v2 instead of math/rand (#7413) 2026-02-11 09:15:51 -07:00
contentlength_test.go fastcgi: explain the 411 a body without a length gets (#7956) 2026-09-23 09:31:54 -06:00
fastcgi.go fastcgi: split script path at segment boundary (#8386) 2026-11-08 21:54:23 +00:00
fastcgi_test.go fastcgi: split script path at segment boundary (#8386) 2026-11-08 21:54:23 +00:00
fastcgi_windows_test.go fastcgi: reject paths whose escaped form selects another script (#8357) 2026-11-04 18:02:42 -05:00
header.go fastcgi: Optimize FastCGI transport (#4978) 2022-09-02 16:57:55 -06:00
incremental_test.go fix: preserve FastCGI dial errors for retry (#8172) 2026-10-08 14:02:20 +10:00
pool.go fastcgi: Optimize FastCGI transport (#4978) 2022-09-02 16:57:55 -06:00
reader.go fastcgi: Optimize FastCGI transport (#4978) 2022-09-02 16:57:55 -06:00
record.go chore: ugh, lint fix... (#7275) 2025-09-26 03:14:48 -04:00
redirect_test.go fastcgi: Use 302 for a Location response without Status (#8209) 2026-10-14 00:27:51 +10:00
request_trailers_test.go reverseproxy: preserve request trailer values (#8246) 2026-10-19 09:16:58 +00:00
responselength_test.go fastcgi: stop response bodies at the declared Content-Length (#8212) 2026-10-26 19:32:45 +00:00
writer.go chore: fix golangci-lint error G602 in caddyhttp (#7334) 2025-11-03 03:04:55 +00:00