How to use basicauth and tls?

1. Caddy version (caddy version):

Iam using docker image lucaslorentz/caddy-docker-proxy:ci-alpine
It uses caddy v2

2. How I run Caddy:

Docker Swarm

a. System environment:

Debian


If i use basicauth with tls i get an error

"logger":"tls.issuance.acme.acme_client","msg":"deactivating authorization",

{"level":"error","ts":1616969230.677829,"logger":"tls","msg":"job failed","error":"domain.com: obtaining certificate: [domain.com] Obtain: [domain.com] solving challenges: [domain.com] context canceled (order=https://acme-v02.api.letsencrypt.org/acme/order/111281218/8727418911) (ca=https://acme-v02.api.letsencrypt.org/directory)"}

My Caddyfile:

domain.com {
	basicauth {
		preview JDJhJDEwJE1vcU0zdWZrkkNRV0F1Lk9QQm90WS51QUxCRVh0bzFURjAxb3JIVC9QbDc5L3RwWk5wWVlL
	}
	reverse_proxy 10.0.22.19:80 10.0.22.18:80
	tls example@gmail.com
}

How can i solve this?

Please fully complete the topic template. Do not delete any sections. It’s impossible to help without seeing your full config and logs. And “latest” is not clear enough for the version, please run caddy version and give us the output.

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