1. Caddy version (caddy version
):
Caddy v2
2. How I run Caddy:
a. System environment:
Docker container
b. Command:
docker-compose up -d
c. Service/unit/compose file:
d. My complete Caddyfile or JSON config:
(AUTH_USERS) {
basicauth / user1 pass1
basicauth / user 2 pass2
}
3. The problem I’m having:
I’m trying to protect some services of my server with basic auth in a snippet, but I can’t get it working for more than 1 user. I’ve tried to include the basic auth inside the service code, but does not work either.
4. Error messages and/or full log output:
/caddy# docker exec -w /etc/caddy caddy caddy reload
{“level”:“info”,“ts”:1591689125.9193683,“msg”:“using adjacent Caddyfile”}
reload: adapting config using caddyfile: parsing caddyfile tokens for ‘basicauth’: Caddyfile:21 - Error during parsing: Wrong argument count or unexpected line ending after ‘pass1’
5. What I already tried:
(AUTH_USERS) {
basicauth / user1 pass1
basicauth / user 2 pass2
}
(AUTH_USERS) {
basicauth {
user1 pass1
}
basicauth {
user 2 pass2
}
}