redirect to websecure
This commit is contained in:
parent
23555aa71b
commit
0bfc7e0890
2 changed files with 8 additions and 5 deletions
|
@ -18,9 +18,11 @@ services:
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.glances.rule=Host(`${HOST_GLANCES}.${DOMAIN}`)
|
- traefik.http.routers.glances.rule=Host(`${HOST_GLANCES}.${DOMAIN}`)
|
||||||
|
- traefik.http.routers.glances.entrypoints=web
|
||||||
- traefik.http.routers.glances.entrypoints=websecure
|
- traefik.http.routers.glances.entrypoints=websecure
|
||||||
- traefik.http.routers.glances.tls=true
|
- traefik.http.routers.glances.tls=true
|
||||||
- traefik.http.routers.glances.tls.certresolver=letsencrypt
|
- traefik.http.routers.glances.tls.certresolver=letsencrypt
|
||||||
|
- traefik.http.routers.glances.middlewares=redirect-to-https
|
||||||
- traefik.http.services.glances.loadbalancer.server.port=61208
|
- traefik.http.services.glances.loadbalancer.server.port=61208
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -16,17 +16,18 @@ services:
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.dashboard.rule=Host(`${HOST_TRAEFIK}.${DOMAIN}`)
|
- traefik.http.routers.dashboard.rule=Host(`${HOST_TRAEFIK}.${DOMAIN}`)
|
||||||
|
- traefik.http.routers.dashboard.entrypoints=web
|
||||||
- traefik.http.routers.dashboard.entrypoints=websecure
|
- traefik.http.routers.dashboard.entrypoints=websecure
|
||||||
- traefik.http.routers.dashboard.tls=true
|
- traefik.http.routers.dashboard.tls=true
|
||||||
- traefik.http.routers.dashboard.tls.certresolver=letsencrypt
|
- traefik.http.routers.dashboard.tls.certresolver=letsencrypt
|
||||||
- traefik.http.services.dashboard.loadbalancer.server.port=8080
|
- traefik.http.services.dashboard.loadbalancer.server.port=8080
|
||||||
# global redirect to https
|
# global redirect to https
|
||||||
- traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)
|
#- traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)
|
||||||
- traefik.http.routers.http-catchall.entrypoints=web
|
#- traefik.http.routers.http-catchall.entrypoints=web
|
||||||
- traefik.http.routers.http-catchall.middlewares=redirect-to-https
|
#- traefik.http.routers.http-catchall.middlewares=redirect-to-https
|
||||||
# middleware redirect
|
# middleware redirect
|
||||||
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
|
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
|
||||||
- traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=false
|
- traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
|
Loading…
Add table
Reference in a new issue