ngalfas
Dabbler
- Joined
- Jul 19, 2020
- Messages
- 17
OK, sorted.
As said, Caddyfile v1 is TOTALLY INCOMPATIBLE with Caddy v2.
caddyserver.com
The main problem was the default use of TLS
caddyserver.com
It's supposed to automatically set certificates. I want it for local domain.
I started to get to the problem by launching caddy from cli.
It showed
So i added in the Caddyfile
(https://caddyserver.com/docs/caddyfile/directives/tls)
To use internal certificate. This now gives
But at least it works. Oh, Caddyfile also needed
to serve the static files (CSS etc)
Hope this is helpfull.
References:
bugs.freebsd.org
So Caddyfile now is
As said, Caddyfile v1 is TOTALLY INCOMPATIBLE with Caddy v2.

Upgrading to Caddy 2 - Caddy Documentation
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
The main problem was the default use of TLS

Automatic HTTPS - Caddy Documentation
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
It's supposed to automatically set certificates. I want it for local domain.
I started to get to the problem by launching caddy from cli.
It showed
Code:
ERROR tls.obtain will retry {"error": "[firefly.local] Obtain: [firefly.local] creating new order: request to https://acme-v02.api.letsencrypt.org/acme/new-order failed after 1 attempts: HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Error creating new order :: Cannot issue for \"firefly.local\": Domain name does not end with a valid public suffix (TLD) (ca=https://acme-v02. api.letsencrypt.org/directory)", "attempt": 1, "retrying_in": 60, "elapsed": 1.625859627, "max_duration": 2592000}
So i added in the Caddyfile
Code:
tls internal
(https://caddyserver.com/docs/caddyfile/directives/tls)
To use internal certificate. This now gives
Code:
ERROR pki.ca.local failed to install root certificate {"error": "trust not supported", "certificate_file": "storage:pki/authorities/local/root.crt"}
But at least it works. Oh, Caddyfile also needed
Code:
file_server
to serve the static files (CSS etc)
Hope this is helpfull.
References:
246623 – www/caddy: update 1.0.4 -> 2.1.1
So Caddyfile now is
Code:
firefly.local { root * /usr/local/www/firefly-iii/public php_fastcgi localhost:9000 tls internal file_server log { output file /var/log/firefly_access.log } }