caddy -version
)?master branch, 1867ded1
Start caddy with HTTPS sites.
domain.name {
}
CADDYPATH=./testdir caddy
None
Certificate files(directories acme
, locks
and ocsp
) in testdir
.
Those files are in ~/.local/share/certmagic
rm -rf testdir ~/.local/share/certmagic
echo 'domain.name {\n}' > Caddyfile
CADDYPATH=./testdir caddy
# maybe
# sudo setcap 'cap_net_bind_service=+ep' `which caddy`
ls ~/.local/share/certmagic
ls testdir
This bug is introduced by 1867ded1
Before it, the CADDYPATH
was wrote to certmagic.DefaultStorage
in function Start
https://github.com/mholt/caddy/commit/1867ded14c82cd2ab296df8d783bbc880360d37d#diff-8632679e3877ee0e47ef75b20c92458eL492
After it, this will happen in function setupTLS
https://github.com/mholt/caddy/commit/1867ded14c82cd2ab296df8d783bbc880360d37d#diff-4a6ec435228114043bb89221e30e51f9R46
But certmagic.DefaultStorage
is read in function NewConfig
and NewWithCache
, which happens before setupTLS
.
So the new value written by setupTLS
is ineffective.
Dang, thanks for the report. Strange that this wasn't caught in dev/testing.
@crvv Would you like an invite to our Caddy Slack? Let me know your email and I can send you one.
Yes, thanks.
Please send it to my email in git history.
cd $GOPATH/src/github.com/mholt/caddy; git log 78455c7cb9c