Errors directive in v.1 absent in the new Caddy

Hi,
First of all, thank you very much to Matt and your colleages for such a great web-server. I found it very fast and user-friendly accoding to my previous Lighttpd.

I am a newbie in Caddy, so maybe my question seems to be naive, sorry for that.
I didn’t find a very important directive “Errors” or similar, that was present in v.1.0.4. I understand, it must be, but hours of reading the docs went in vain. Caddy doesn’t leave any possible error records neither in access log, nor in system journal. Can you, please, clarify it.

Hi Ahmed, welcome to the forum, and to Caddy –

Hours of reading the docs? What were you reading? At least you probably have a very thorough knowledge of Caddy by now.

Your answer is right here in the upgrade guide:

In v2, all logs go to the same place by default (stderr).

Thank you, Matt. Of course, I read that introdution, my new Caddy’s log records the access events, nice but not sufficient. For example, a while ago I was deploying Caddy proxy for Seafile backend, could’t understand why doesn’t work the code:
cloud.example.net {
tls /etc/ssl/Letsencrypt/rsa/0001_chain.pem /etc/ssl/Letsencrypt/rsa/rsa.key
handle /seafhttp/* {
reverse_proxy 127.0.0.1:8082
uri strip_prefix /seafhttp <----- that was missing
}
handle * {
reverse_proxy [::1]:8000
}
}
access.log didn’t include appropriate information :slight_smile:
Sure, I will learn Caddy better, but at the first time hard to discover the issues without errors.log (which was in v.1.0.4)

Today I installed PhpLiteAdmin and every entry attempt failed with error " CSRF token is wrong - please try to login again". Caddy log didn’t find the problem out. Temporarily stopped Caddy and started Lighttpd, in its error.log was:
2020-06-14 23:42:52: (mod_fastcgi.c.421) FastCGI-stderr: PHP message: PHP Warning: session_start(): open(/var/lib/php/session/sess_8qkktm9dc1tvh3o5nkepp1n5ur, O_RDWR) failed: Permission denied (13) in /var/www/rainloop/db/phpliteadmin.php on line 464PHP message: PHP Warning: session_start(): Failed to read session data: files (path: /var/lib/php/session) in /var/www/rainloop/db/phpliteadmin.php on line 464
Clear, error of permissions. Lighttpd’s log helped, Caddy’s one not…

Maybe I previously inaccurately formulated a question. Caddy logger works nice with access logging, but can it log system events and errors?

This topic was automatically closed after 30 days. New replies are no longer allowed.