@@ -47,6 +47,26 @@ traefik.http.middlewares.example-middleware.redirectregex.replacement=${1}://www
4747traefik.http.middlewares.example-middleware.redirectregex.permanent=true
4848```
4949
50+ ### domain -> other domain
51+
52+ ``` bash
53+ traefik.http.middlewares.redirect-otherdomain.redirectregex.regex=^(https? ://)? source-domain\. com(.* )
54+ traefik.http.middlewares.redirect-otherdomain.redirectregex.replacement=https://target-domain.com${2}
55+ traefik.http.middlewares.redirect-otherdomain.redirectregex.permanent=true
56+ ```
57+
58+ If you also need to generate a ssl cert for the target-domain, additionally add a routers entry
59+
60+ ``` bash
61+ traefik.http.routers.redirect-otherdomain.middlewares=redirect-to-https
62+ traefik.http.routers.redirect-otherdomain.rule=Host(` target-domain.com` ) && PathPrefix(` /` )
63+ traefik.http.routers.redirect-otherdomain.entryPoints=https
64+ traefik.http.routers.redirect-otherdomain.middlewares=redirect-otherdomain
65+ traefik.http.routers.redirect-otherdomain.rule=Host(` target-domain.com` ) && PathPrefix(` /` )
66+ traefik.http.routers.redirect-otherdomain.tls.certresolver=letsencrypt
67+ traefik.http.routers.redirect-otherdomain.tls=true
68+ ```
69+
5070## Docker Compose based Applications & one-click Services
5171
5272- You need to set both FQDNs for your resource, so for example: ` coolify.io,www.coolify.io `
@@ -67,3 +87,25 @@ traefik.http.middlewares.example-middleware.redirectregex.regex=^(http|https)://
6787traefik.http.middlewares.example-middleware.redirectregex.replacement=${1} ://www.${2}
6888traefik.http.middlewares.example-middleware.redirectregex.permanent=true
6989```
90+
91+ ## Debugging
92+
93+ You can check, if the traefik settings have been correctly applied, when inspecting your docker target container.
94+
95+ Find your docker container id
96+ ``` bash
97+ docker ps
98+ ```
99+
100+ Inspect the containers labels
101+
102+ ``` bash
103+ docker inspect < container-id>
104+ ```
105+
106+ You can additionally check the traefik container logs, by running
107+
108+ ``` bash
109+ docker logs -f coolify-proxy
110+ ```
111+
0 commit comments