Enabling the ACME protocol

The configuration of the ACME protocol with an HTTP authentication is quite simple. For this, a custom Treafik configuration file is needed instead of the default one. First, the entry points are configured:

defaultEntryPoints = ["https","http"][entryPoints]  [entryPoints.http]  address = ":80"    [entryPoints.http.redirect]    entryPoint = "https"  [entryPoints.https]  address = ":443"  [entryPoints.https.tls]

Two entry points are defined, one for HTTP and one for HTTPS. HTTP requests are redirected to the HTTPS entry point so that all traffic is secured.

Then, some other parts of Traefik are configured:

[retry][docker]endpoint = "unix:///var/run/docker.sock"domain = "vps123456.ovh.net"watch = trueexposedbydefault = false ...

Get Hands-On Reactive Programming with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.