Created
March 29, 2020 16:15
-
-
Save joshualyon/f5ae2193983a9d72cc6cbfe2d458885c to your computer and use it in GitHub Desktop.
Example snippet of traefik configuration file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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