Skip to content

Commit 4304fbf

Browse files
committed
docs: add v3 example for SaaS configuration
1 parent 86af28c commit 4304fbf

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

docs/knowledge-base/proxy/traefik/wildcard-certs.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@ description: "A guide to configure wildcard subdomain redirects (with Traefik wi
1414
::: tip Tip
1515
Each provider needs environment variables to be set in the Traefik configuration. You can find the required variables in the [official documentation](https://doc.traefik.io/traefik/https/acme/#providers).
1616

17-
1817
If you need fine-grained token, like with [Cloudflare](https://go-acme.github.io/lego/dns/cloudflare/), check the provider configurations.
1918
:::
2019

21-
2220
## Configuration
2321

2422
1. Setup your wildcard subdomain DNS records, `*.coolify.io`.
2523
2. Go to your Proxy settings (Servers / Proxy menu) and add the following configuration based on your [providers](https://doc.traefik.io/traefik/https/acme/#providers). The example will use `Hetzner` as a provider.
2624

27-
2825
```bash
2926
version: '3.8'
3027
networks:
@@ -120,6 +117,26 @@ Redirect all subdomains to one application. You can use this option if you want
120117
- In your application, leave the FQDN configuration `empty`.
121118
- Add the following custom label configuration:
122119

120+
:::tabs key:saas
121+
== Traefik v3
122+
123+
```bash
124+
traefik.enable=true
125+
traefik.http.routers.<unique_router_name_https>.rule=HostRegexp(`^.+\.coolify\.io$`)
126+
traefik.http.routers.<unique_router_name_https>.entryPoints=https
127+
traefik.http.routers.<unique_router_name_https>.middlewares=gzip
128+
traefik.http.routers.<unique_router_name_https>.service=<unique_service_name>
129+
traefik.http.routers.<unique_router_name_https>.tls.certresolver=letsencrypt
130+
traefik.http.services.<unique_service_name>.loadbalancer.server.port=80
131+
traefik.http.routers.<unique_router_name_https>.tls=true
132+
133+
traefik.http.routers.<unique_router_name_http>.rule=HostRegexp(`^.+\.coolify\.io$`)
134+
traefik.http.routers.<unique_router_name_http>.entryPoints=http
135+
traefik.http.routers.<unique_router_name_http>.middlewares=redirect-to-https
136+
```
137+
138+
== Traefik v2
139+
123140
```bash
124141
traefik.enable=true
125142
traefik.http.routers.<unique_router_name_https>.rule=HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.coolify.io`)
@@ -135,11 +152,13 @@ traefik.http.routers.<unique_router_name_http>.entryPoints=http
135152
traefik.http.routers.<unique_router_name_http>.middlewares=redirect-to-https
136153
```
137154

155+
:::
156+
138157
> `traefik.http.routers.<unique_router_name_https>.tls.certresolver` should be the same as your `certresolver` name in Traefik proxy configuration, by default `letsencrypt`.
139158
140159
> `traefik.http.services.<unique_service_name>.loadbalancer.server.port` should be the same as your application listens on. Port 80 if you use a static deployment.
141160
142161
::: warning Caution
143-
You cannot use both configurations (Normal & SaaS) at the same time on one
144-
server.
162+
You cannot use both configurations (Normal & SaaS) at the same time on one
163+
server.
145164
:::

0 commit comments

Comments
 (0)