Skip to content

Commit 5d6fefa

Browse files
authored
GLPI with Let's Encrypt Using Docker Compose
1 parent d0acce3 commit 5d6fefa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

glpi-traefik-letsencrypt-docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ services:
9595
- "--entrypoints.web.address=:80"
9696
# Define the secure (HTTPS) entry point on port 443
9797
- "--entrypoints.websecure.address=:443"
98+
# HTTP -> HTTPS redirect at entrypoint level
99+
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
100+
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
98101
# Enable the Docker provider to detect containers and their labels
99102
- "--providers.docker=true"
100103
# Point Traefik to the Docker socket
@@ -146,11 +149,6 @@ services:
146149
- "traefik.http.services.dashboard.loadbalancer.server.port=8080"
147150
# Pass the original Host header to the backend
148151
- "traefik.http.services.dashboard.loadbalancer.passhostheader=true"
149-
# HTTP -> HTTPS redirect for all hosts
150-
- "traefik.http.routers.http-catchall.rule=HostRegexp(`{host:.+}`)"
151-
- "traefik.http.routers.http-catchall.entrypoints=web"
152-
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
153-
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
154152
restart: unless-stopped
155153

156154
backups:

0 commit comments

Comments
 (0)