I don’t have a domain name, but I want to get the secure ability provided by TLS.
How to config in Caddy v2?
My Caddyfile is as follows:
:57777 {
tls internal
root * /var/www
file_server
}
I got the following output including errors:
caddy start -config “/etc/caddy/Caddyfile”
2020/06/01 16:34:56.679 INFO using provided configuration {“config_file”: “/etc/caddy/Caddyfile”, “config_adapter”: “”}
2020/06/01 16:34:56.682 INFO admin admin endpoint started {“address”: “tcp/localhost:2019”, “enforce_origin”: false, “origins”: [“[::1]:2019”, “127.0.0.1:2019”, “localhost:2019”]}
2020/06/02 00:34:56 [INFO][cache:0xba7e740] Started certificate maintenance routine
2020/06/01 16:34:56.863 WARN pki.ca.local installing root certificate (you might be prompted for password) {“path”: “storage:pki/authorities/local/root.crt”}
2020/06/02 00:34:56 not NSS security databases found
2020/06/02 00:34:56 define JAVA_HOME environment variable to use the Java trust
2020/06/01 16:34:56.864 ERROR pki.ca.local failed to install root certificate {“error”: “install is not supported on this system”, “certificate_file”: “storage:pki/authorities/local/root.crt”}
2020/06/01 16:34:56.865 INFO tls cleaned up storage units
2020/06/01 16:34:56.866 INFO autosaved config {“file”: “/root/.config/caddy/autosave.json”}
2020/06/01 16:34:56.866 INFO serving initial configuration
Successfully started Caddy (pid=31949) - Caddy is running in the background
Indeed after I creat $HOME/.local/share/caddy/
, I can find the root cert and intermediate cert generated there. So why still the error shows?