Last active
December 4, 2018 15:41
-
-
Save u007/c89688d4e5d31f392bad5a784f5208d6 to your computer and use it in GitHub Desktop.
Caddy vs traefik
This file contains 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
www.example.com:80, www.example.com:443 { | |
tls self_signed | |
log /logs access.log | |
errors visible | |
proxy /assets nginx:80 | |
proxy / web:3000 | |
redir 301 { | |
if {>X-Forwarded-Proto} is http | |
/ https://{host}{uri} | |
} | |
} | |
} |
This file contains 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
#debug = true | |
[backends] | |
[backends.buffalo] | |
[backends.buffalo.loadbalancer.stickiness] | |
[backends.buffalo.healthcheck] | |
path = "/healthcheck" | |
interval = "11s" | |
[backends.buffalo.servers.server1] | |
url = "http://web:3000" | |
[backends.backendNginx] | |
[backends.backendNginx.loadbalancer.stickiness] | |
[backends.backendNginx.servers.server1] | |
url = "http://nginx:80" | |
[frontends] | |
[frontends.frontend1] | |
backend = "buffalo" | |
[frontends.frontend1.routes.web] | |
rule = "Host:www.example.com" | |
entrypoints = ["http","https"] | |
passHostHeader = true | |
#passTLSCert = true | |
priority = 10 | |
[frontends.nginx] | |
backend = "backendNginx" | |
[frontends.nginx.routes.web] | |
rule = "Host:www.example.com;PathPrefix:/assets" | |
passHostHeader = true | |
#passTLSCert = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment