1. Caddy version (caddy version
):
2.3.0
2. How I run Caddy:
Caddy runs as local reverse proxy for www1.example.com and it works fine.
a. System environment:
Ubuntu 20.04, systemd
b. Command:
Paste command here.
systemctl start caddy.service
#### c. Service/unit/compose file:
<!-- If using Docker/systemd/Kubernetes/make etc. -->
N/A
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
#### d. My complete Caddyfile or JSON config:
Paste config here, replacing this text.
Use caddy fmt
to make it readable.
DO NOT REDACT anything except credentials.
LEAVE DOMAIN NAMES INTACT.
Make sure the backticks stay on their own lines.
root@pur:~# cat /etc/caddy/Caddyfile
www1.example.com {
reverse_proxy 127.0.0.1:81
log {
output file /tmp/caddy/nc.log
format filter {
wrap console
fields {
request>headers>Authorization delete
}
}
}
}
### 3. The problem I'm having:
<!-- What are you trying to do, and what isn't working? Please describe the issue thoroughly enough so that anyone can reproduce the exact behavior you're seeing. Be as specific as possible. DO NOT USE WEB BROWSERS; use "curl -v" instead. -->
The problem is the access log file doesn't get any logs. The whole path to /tmp/caddy/nc.log has 777 permissions.
### 4. Error messages and/or full log output:
<!-- Please **DO NOT REDACT** any information except credentials. Leave domain names intact! -->
<!-- Please **DO NOT POST TRUNCATED LOG LINES** as systemd is notorious for this. -->
<!-- Please **DO NOT USE WEB BROWSERS.** Use curl -v instead. -->
I don't see any messages about /tmp/caddy/nc.log in /var/log/messages or in journalctl -u caddy.service
### 5. What I already tried:
<!-- Show us what effort you've put in to solving the problem. Be specific -- people are volunteering their time to help you! Low effort posts are not likely to get good answers! -->
If i only use 'log" keyword in Caddyfile, i do see access logs in journalctl -u caddy.service
### 6. Links to relevant resources: