1
0
mirror of https://github.com/containous/traefik.git synced 2024-12-24 21:34:39 +03:00
traefik/docs/content/https/include-acme-multiple-domains-example.md

71 lines
1.8 KiB
Markdown
Raw Normal View History

2023-05-10 16:28:05 +03:00
```yaml tab="Docker & Swarm"
## Dynamic configuration
labels:
2020-03-14 00:50:05 +03:00
- traefik.http.routers.blog.rule=Host(`example.com`) && Path(`/blog`)
- traefik.http.routers.blog.tls=true
2020-02-17 13:04:04 +03:00
- traefik.http.routers.blog.tls.certresolver=myresolver
2020-03-14 00:50:05 +03:00
- traefik.http.routers.blog.tls.domains[0].main=example.org
- traefik.http.routers.blog.tls.domains[0].sans=*.example.org
```
```yaml tab="Docker (Swarm)"
## Dynamic configuration
deploy:
labels:
2020-03-14 00:50:05 +03:00
- traefik.http.routers.blog.rule=Host(`example.com`) && Path(`/blog`)
- traefik.http.services.blog-svc.loadbalancer.server.port=8080"
- traefik.http.routers.blog.tls=true
2020-02-17 13:04:04 +03:00
- traefik.http.routers.blog.tls.certresolver=myresolver
2020-03-14 00:50:05 +03:00
- traefik.http.routers.blog.tls.domains[0].main=example.org
- traefik.http.routers.blog.tls.domains[0].sans=*.example.org
```
```yaml tab="Kubernetes"
2023-03-20 17:38:08 +03:00
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: blogtls
spec:
entryPoints:
- websecure
routes:
2020-03-14 00:50:05 +03:00
- match: Host(`example.com`) && Path(`/blog`)
kind: Rule
services:
- name: blog
port: 8080
tls:
2020-02-17 13:04:04 +03:00
certResolver: myresolver
2020-03-04 15:24:05 +03:00
domains:
2020-03-14 00:50:05 +03:00
- main: example.org
2020-03-04 15:24:05 +03:00
sans:
- '*.example.org'
```
```yaml tab="File (YAML)"
## Dynamic configuration
http:
routers:
blog:
2020-03-14 00:50:05 +03:00
rule: "Host(`example.com`) && Path(`/blog`)"
tls:
2020-02-17 13:04:04 +03:00
certResolver: myresolver
domains:
2020-03-14 00:50:05 +03:00
- main: "example.org"
sans:
2020-03-14 00:50:05 +03:00
- "*.example.org"
```
```toml tab="File (TOML)"
## Dynamic configuration
[http.routers]
[http.routers.blog]
rule = "Host(`example.com`) && Path(`/blog`)"
[http.routers.blog.tls]
certResolver = "myresolver" # From static configuration
[[http.routers.blog.tls.domains]]
main = "example.org"
sans = ["*.example.org"]
```