Update traefik container configuration

This commit is contained in:
Francesco Antognazza 2023-02-07 14:05:12 +01:00
parent 81e6e04429
commit 0c15ec9f9d
2 changed files with 11 additions and 2 deletions

View File

@ -102,8 +102,9 @@
io.containers.autoupdate: "registry"
traefik.enable: "true"
traefik.http.middlewares.traefik-auth.basicauth.users: "{{ vault_traefik_basic_auth }}"
traefik.http.middlewares.traefik-prefixstrip.stripprefix.prefixes: "/traefik"
traefik.http.routers.traefik.entrypoints: "https"
traefik.http.routers.traefik.rule: "PathPrefix(`/traefik`)"
traefik.http.routers.traefik.rule: "PathPrefix(`/traefik`) || HeadersRegexp(`Referer`, `.*/traefik/.*`)"
traefik.http.routers.traefik.middlewares: "traefik-auth@docker"
traefik.http.routers.traefik.tls: "true"
traefik.http.routers.traefik.tls.certresolver: "wildcard"

View File

@ -3,12 +3,20 @@ http:
cockpit:
rule: "PathPrefix(`/cockpit`)"
entryPoints: https
middlewares:
- cockpit-stripprefix
service: cockpit
tls:
certresolver: wildcard
middlewares:
cockpit-stripprefix:
stripPrefix:
prefixes:
- "/cockpit"
services:
cockpit:
loadBalancer:
servers:
- url: "http://{{ ansible_host }}:9090"
- url: "http://127.0.0.1:9090"