I installed a Django app on AWS EC2 using Docker. My confguration follows the Django cookiecutter template. But when I start my containers, I see this error in the logs:
"Unable to obtain ACME certificate for domains \"example.com,www.example.com\": unable to generate a certificate for the domains [example.com www.example.com]: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for \"example.com\":
So it does not seem to pick up my domain name at all, but thinks my domain is example.com, and not the domain specified in the yml file.
This is my traefik.yml file:
log: level: INFO entryPoints: web: # http address: ':80' http: # https://docs.traefik.io/routing/entrypoints/#entrypoint redirections: entryPoint: to: web-secure web-secure: # https address: ':443' flower: address: ':5555' certificatesResolvers: letsencrypt: # https://docs.traefik.io/master/https/acme/#lets-encrypt acme: email: 'jang@***.com' storage: /etc/traefik/acme/acme.json # https://docs.traefik.io/master/https/acme/#httpchallenge httpChallenge: entryPoint: web http: routers: web-secure-router: rule: 'Host(`store.MYDOMAIN.com`)' entryPoints: - web-secure middlewares: - csrf service: django tls: # https://docs.traefik.io/master/routing/routers/#certresolver certResolver: letsencrypt flower-secure-router: rule: 'Host(`store.MYDOMAIN.com`)' entryPoints: - flower service: flower tls: # https://docs.traefik.io/master/routing/routers/#certresolver certResolver: letsencrypt middlewares: csrf: # https://docs.traefik.io/master/middlewares/headers/#hostsproxyheaders # https://docs.djangoproject.com/en/dev/ref/csrf/#ajax headers: hostsProxyHeaders: ['X-CSRFToken'] services: django: loadBalancer: servers: - url: http://django:5000 flower: loadBalancer: servers: - url: http://flower:5555 providers: # https://docs.traefik.io/master/providers/file/ file: filename: /etc/traefik/traefik.yml watch: true
Any help / insight is appreciated