1. Caddy version (caddy version
):
Caddy 2.0.0
2. How I run Caddy:
I run caddy with smokeping and fcgiwrap.
a. System environment:
Debian Buster
b. Command:
0.0.0.0:8981 {
root * /usr/share/smokeping/www
php_fastcgi unix//var/run/fcgiwrap.socket {
env SCRIPT_FILENAME /usr/share/smokeping/smokeping.cgi
}
}
0.0.0.0:8981/js {
root * /usr/share/smokeping/www/js
}
0.0.0.0:8981/css {
root * /usr/share/smokeping/www/css
}
0.0.0.0:8981/cache {
root * /var/cache/smokeping
}
0.0.0.0:8981/smokeping/images {
root * /usr/share/smokeping/www/images
}
This is the config I previous used on caddy1, which could be found from here:
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
N/A
3. The problem I’m having:
After I migrated to caddy2, there seems haven’t been a directive like the “http.fastcgi” option in caddy1 (https://caddyserver.com/v1/docs/fastcgi). The document of caddy2 only provide a directive called “php-fastcgi”, which seems only valid for php-fpm. I’ve tried to set the gateway to fcgiwrap.socket and modified the Caddyfile, however, the caddy still return error under the “php_fastcgi” section.
4. Error messages and/or full log output:
run: adapting config using caddyfile: parsing caddyfile tokens for 'php_fastcgi': /etc/caddy/Caddyfile:4 - Error during parsing: unrecognized subdirective env
5. What I already tried:
I’ve tried remove line4, however after remove that line, the webpage turns into blank.
The smokeping and previous Caddyfile(mentioned above, github dot com/caddyserver/examples/blob/master/smokeping/Caddyfile) works well with caddy1.
6. Links to relevant resources:
Thanks in advance.