1. Caddy version (caddy version
):
v2.3.0
2. How I run Caddy:
a. System environment:
OS Armbian 20.11.6 Buster with Linux 5.9.14-rockchip64
b. Command:
caddy run
c. Service/unit/compose file:
not used
d. My complete Caddyfile or JSON config:
mywebsite.xy {
root * /var/www/mywebsite
file_server
log {
output file /var/log/caddy.log
}
}
pihole.mywebsite.xy {
@internal {
remote_ip 192.168.1.1/12
}
handle @internal {
reverse_proxy localhost:1080
encode zstd gzip
}
respond "Acess denied" 403
}
3. The problem I’m having:
Hello.
As I already explained in a previous post, I’m slowly learning how to administrate my server. After my first tries with Caddy I broke everything, and I realized that Caddy could generate only one log and not one log per sub-domain. (contrary to what I had done at the time Setup Wordpress subdomain ) (the goal being to monitor access to certain services with fail2ban)
That’s why I wanted to generate the logs from the “top domain”.
But i have this trouble : if I go to /var/log I can’t find caddy.log.
(and therefore, I don’t have access to any log).
However, I checked that caddy had the rights on this file.
4. Error messages and/or full log output:
5. What I already tried:
Tried to create an empty file named “caddy.log” in the /var/log … but nothing change …
Thank you a lot for you help