1. Caddy version (caddy version
):
v2.0.0 h1:pQSaIJGFluFvu8KDGDODV8u4/QRED/OPyIR+MWYYse8=
2. How I run Caddy:
a. System environment:
OS: Debian 9.13 stretch
Kernel: x86_64 Linux 4.14
Uptime: 68d 22h 35m
Packages: 523
Shell: zsh 5.3.1
CPU: QEMU Virtual CPU version (cpu64-rhel6) @ 2.7GHz
RAM: 548MiB / 2013MiB
b. Command:
caddy run --config /etc/caddy/Caddyfile
d. My complete Caddyfile or JSON config:
domain {
tls email
root * /var/www/
php_fastcgi unix//tmp/php-cgi.sock
}
3. The problem I’m having:
I was able to convert the follow nginx configuration
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
to caddy v1
rewrite {
to {path} {path}/ /index.php?{query}
}
But I have no idea how to do so in caddy v2
5. What I already tried:
rewrite * /index.php?{query}
also
try_files {path} {path}/ /index.php?{query}
and
try_files $uri $uri/ /index.php?{query}