ACME error with handle_errors?

I thought this should be a bug.

handle_errors {
	rewrite * /
	file_server
}

2020/06/20 19:58:56 [ERROR] attempt 1: [handle_errors] Obtain: [handle_errors] acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "handle_errors": Domain name contains an invalid character, url: - retrying in 1m0s (6.247250119s/720h0m0s elapsed)...

The first thing in your Caddyfile must be a site label.

Caddy is parsing handle_errors as your domain name and is trying to issue a certificate for that.

I think you should spend more time reading the documentation.

1 Like

Thanks, I have previously ran Caddy on production sites but certain documentation was not clear especially reverse_proxy directive when some readers come from other backgrounds, I have spent two hours googling, forums and someone’s Caddyfile in Github for a similar example.

Good thing that I’m familiar with Go language. :grimacing:

I would say H2O documentation was more clear to indicate global, local scope, etc.
https://h2o.examp1e.net/configure/quick_start.html
https://h2o.examp1e.net/configure/proxy_directives.html

The first place to look should always be the official documentation.

1 Like

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