Bug
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
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.
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.
traefik version
:Traefik version v1.7.9 built on 2019-02-11_11:36:32AM
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
servers.toml
loglevel = "ERROR"
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: