1. Caddy version (caddy version):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
a. System environment:
Windows 7
b. Command:
caddy.exe run --config Caddyfile.V2
d. My complete Caddyfile or JSON config:
localhost:20000, 127.0.0.1:20000 {
root ./webapp
php_fastcgi localhost:6545
try_files {path}.html {path}.htm {path}.php {path}
}
3. The problem I’m having:
This was my V1 Caddyfile:
localhost:20000, 127.0.0.1:20000 {
root ./webapp
tls self_signed
ext .html .htm .php
on startup php_cgi.bat &
fastcgi / 127.0.0.1:6545 php
}
I would like to get EXACTLY the same with Caddy 2.
I understand that the “on” directive has gone. No problem. I can run php_cgi.bat alone.
Now I’m using this V2 caddyfile:
localhost:20000, 127.0.0.1:20000 {
root ./webapp
php_fastcgi localhost:6545
try_files {path}.html {path}.htm {path}.php {path}
}
I’m no longer getting 404 errors.
Anything not matching a request is redirected to index.php.
Why?
Can I avoid this behaviour and have my 404 errors back?