Traefik: Multiple SSL certificates don't work as per documentation

Created on 29 Mar 2019  路  1Comment  路  Source: traefik/traefik

Do you want to request a feature or report a bug?

Bug

What did you do?

I have been using a single certificate with traefik successfully for a while, I added a second certificate as per the HTTP + HTTPS step here: https://docs.traefik.io/user-guide/examples/ and the server refuses to start. I added the following to my config:

[[entryPoints.https.tls.certificates]]
      certFile = "/certs/myotherdomain.com.au.crt"
      keyFile = "/certs/myotherdomain.com.au.key"

Here is the full traefik.toml file:

debug = false

logLevel = "INFO"
defaultEntryPoints = ["https","http"]

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]
    [[entryPoints.https.tls.certificates]]
      certFile = "/certs/mywildcarddomain.info.crt"
      keyFile = "/certs/mywildcarddomain.info.key"
[[entryPoints.https.tls.certificates]]
      certFile = "/certs/myotherdomain.com.au.crt"
      keyFile = "/certs/myotherdomain.com.au.key"
[retry]

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "mydomain.com"
watch = true
exposedByDefault = false

[file]
filename = "servers.toml"
watch = true

What did you expect to see?

I expected to have both of my domains working with the appropriate certificates. Both entries work individually, but not together. The documentation suggests that you can have multiple entries, but it seems to not be functioning this way.

What did you see instead?

The log file throws the following error:
Error reading TOML config file /traefik.toml : Near line 19 (last key parsed 'entryPoints.https.tls.certificates.certFile'): Key 'entryPoints.https.tls.certificates.certFile' has already been defined.

Output of traefik version:

Traefik version v1.7.9 built on 2019-02-11_11:36:32AM

Config Files

traefik.toml

debug = false

logLevel = "INFO"
defaultEntryPoints = ["https","http"]

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]
    [[entryPoints.https.tls.certificates]]
      certFile = "/certs/mywildcarddomain.info.crt"
      keyFile = "/certs/mywildcarddomain.info.key"
    [[entryPoints.https.tls.certificates]]
      certFile = "/certs/myotherdomain.com.au.crt"
      keyFile = "/certs/myotherdomain.com.au.key"
[retry]

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "mydomain.com"
watch = true
exposedByDefault = false

[file]
filename = "servers.toml"
watch = true

server.toml

servers.toml loglevel = "ERROR"

kinquestion statu5-frozen-due-to-age

>All comments

Hi! I'm Tr忙fiker :robot: the bot in charge of communication regulation.

Thanks for your interest in Traefik!

We dedicate the issue tracker to bug reports and feature requests only. My advanced AI tells me this one is neither of them.

I encourage your to seek community support: join our Slack workspace and reach out to us on the #support channel.

Another option is to use Stack Overflow and tag your question traefik.

You can of course double check Traefik's documentation :sweat_smile:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ewah picture ewah  路  3Comments

mikaelmorvan picture mikaelmorvan  路  3Comments

arschles picture arschles  路  3Comments

OndroNR picture OndroNR  路  3Comments

thomas15v picture thomas15v  路  3Comments