Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example snippet of traefik configuration file
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
certFile = """-----BEGIN CERTIFICATE-----
MY-SSL-CERT-FILE-HERE
-----END CERTIFICATE-----"""
keyFile = """-----BEGIN PRIVATE KEY-----
MY-SSL-PRIVATE-KEY-HERE
-----END PRIVATE KEY-----"""
# There are other ways of handling the SSL like setting up
# LetsEncrypt which is probably what I will move to. I
# already had an SSL cert from my Apache setup, so I just
# used it here.
# You can also reference the file directly from your file
# system, but I had some trouble getting the reference to
# work so I just put the content directly into the Traefik
# toml file
[web]
address = ":8080"
dashboard = true
[ping]
[file]
[backends]
[backends.mycoolapp]
[backends.mycoolapp.servers.primary]
url = "http://10.0.3.1:7878/internalapppath"
[frontends]
[frontends.mycoolapp]
backend = "mycoolapp"
[frontends.mycoolapp.routes.default]
rule = "PathPrefix:/externalappname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.