Cannot multiplex localhost

1. Caddy version (caddy version):

1.0.3

2. How I run Caddy:

I am running it in Docker image

a. System environment:

linux host : x86_64 x86_64 x86_64 GNU/Linux
Docker version 18.09.9, build 039a7df9ba
docker image : abiosoft/caddy:no-stats

b. Command:

docker run --entrypoint sh -it -v"/local/cert/app:/local/cert/app" -p2017:2015 f84aa7755739
Inside the container caddy --conf etc/Caddyfile

c. Service/unit/compose file:

paste full file contents here

d. My complete Caddyfile or JSON config:

0.0.0.0:2015 {
  root /srv

  gzip
  tls /local/cert/app/app.pem /local/cert/app/app.key 
  log stdout

  proxy /api/v1/public http://{$API_HOST}:{$PORT} {
    policy round_robin
    transparent
  }

  rewrite {
    if {path} not_match ^/api
    to {path} {path}/ /
  }
}

3. The problem I’m having:

I am trying to work with enabling tls certificates with internal
I have a root ca certificate and a issuing ca certificate
with cer extenstions. The app works fine with external certficates issued by
Digicert

4. Error messages and/or full log output:

Activating privacy features… done.
2020/12/18 14:49:05 cannot multiplex 0.0.0.0 (TLS) and (not TLS) on same listener
exit status 1

5. What I already tried:

I am running it from an image instead of docker stack to isolate it.¨
I am to reproduce the error.
I tried to change the address and ports but nothing works .
right now I am trying to see which port is it actually talking about by using logging options

6. Links to relevant resources:

Caddy v1 is no longer supported. Please upgrade to Caddy v2.

We also now have an official docker image Docker Hub

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