Basicauth not working in conjunction with proxy


I’m trying to use Caddy as a basic auth and proxy front-end to Jenkins. I’m currently hosting on AWS and using their certificate service for HTTPS so have disabled Caddy tls. My caddy file looks like:

tls off
log stdout
errors stdout

basicauth / username 123password
proxy / {$JENKINS_URL}

The problem I’m running into is that basicauth doesn’t seem to be working. After deploying I get the prompt for the username/password but after entering valid credentials and submitting they are denied. It’s worth noting that if I remove the basicauth line completely that proxying works just fine.

What am I doing wrong here? Do basicauth and proxy not play well together? Does the order within the Caddyfile matter?

Any help you can provide would be much appreciated!



So it turns out that this is a Jenkins issue not a Caddy issue. Caddy basic auth and Jenkins basic auth were clashing resulting in the invalid credential error.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.