1. Caddy version (caddy version
):
v2.4.1
2. How I run Caddy:
I use CaddyFile
a. System environment:
ubuntu 20.04
b. Command:
systemctl start caddy
d. My complete Caddyfile or JSON config:
example.com {
log {
output file /var/log/caddy.log
}
handle /js/* {
root * /usr/share/smokeping/www/js
file_server
}
handle /css/* {
root * /usr/share/smokeping/www/css
file_server
}
handle /cache/* {
root * /var/cache/smokeping
}
handle /images/* {
root * /usr/share/smokeping/www/images
file_server
}
handle {
root * /usr/share/smokeping/www
file_server
reverse_proxy unix//var/run/fcgiwrap.socket {
transport fastcgi {
split ""
env SCRIPT_FILENAME /usr/share/smokeping/smokeping.cgi
}
}
}
}
3. The problem I’m having:
Now I can access the smokeping webpage. But all js, css, image resources are 404 Not Found. I’m sure the path in the caddyfile is correct. What did I do wrong?
4. Error messages and/or full log output:
404 Not Found.