compose
This commit is contained in:
parent
cff2fc461f
commit
5eba3bd9a6
|
@ -34,14 +34,20 @@ services:
|
||||||
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
||||||
- "traefik.http.routers.demo01-jib-ssl.tls=true"
|
- "traefik.http.routers.demo01-jib-ssl.tls=true"
|
||||||
- "traefik.http.routers.demo01-jib-ssl.entrypoints=web-ssl"
|
- "traefik.http.routers.demo01-jib-ssl.entrypoints=web-ssl"
|
||||||
- "traefik.http.routers.demo01-jib-ssl.rule=PathPrefix(`/demo01`)"
|
- "traefik.http.routers.demo01-jib-ssl.rule=Host(`www.dingzhaojun.top`) && PathPrefix(`/demo01`)"
|
||||||
- "traefik.http.routers.demo01-jib-ssl.service=demo01"
|
- "traefik.http.routers.demo01-jib-ssl.service=demo01"
|
||||||
|
|
||||||
# HTTP 协议自动跳转 HTTPS
|
# 定义URL重定向中间件switch-domain,将http://localhost转换为https://www.dingzhaojun.top
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
- "traefik.http.middlewares.switch-domain.redirectregex.regex=^http://localhost(.*)"
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
- "traefik.http.middlewares.switch-domain.redirectregex.replacement=http://www.dingzhaojun.top$$1"
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
|
||||||
#- "traefik.http.routers.demo01-jib.middlewares=to-https"
|
# 定义URL中的scheme、port重定向中间件to-https,将http转换为https,8081转换为7443,但不转换IP地址部分
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
||||||
|
|
||||||
|
# 设置路由demo01-jib使用的中间件
|
||||||
|
- "traefik.http.routers.demo01-jib.middlewares=switch-domain"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
y9-share-net:
|
y9-share-net:
|
||||||
|
|
|
@ -34,15 +34,21 @@ services:
|
||||||
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
||||||
- "traefik.http.routers.demo01-jvm-ssl.tls=true"
|
- "traefik.http.routers.demo01-jvm-ssl.tls=true"
|
||||||
- "traefik.http.routers.demo01-jvm-ssl.entrypoints=web-ssl"
|
- "traefik.http.routers.demo01-jvm-ssl.entrypoints=web-ssl"
|
||||||
- "traefik.http.routers.demo01-jvm-ssl.rule=PathPrefix(`/demo01`)"
|
- "traefik.http.routers.demo01-jvm-ssl.rule=Host(`www.dingzhaojun.top`) && PathPrefix(`/demo01`)"
|
||||||
- "traefik.http.routers.demo01-jvm-ssl.service=demo01"
|
- "traefik.http.routers.demo01-jvm-ssl.service=demo01"
|
||||||
|
|
||||||
|
|
||||||
# HTTP 协议自动跳转 HTTPS
|
# 定义URL重定向中间件switch-domain,将http://localhost转换为https://www.dingzhaojun.top
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
- "traefik.http.middlewares.switch-domain.redirectregex.regex=^http://localhost(.*)"
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
- "traefik.http.middlewares.switch-domain.redirectregex.replacement=http://www.dingzhaojun.top$$1"
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
|
||||||
#- "traefik.http.routers.demo01-jib.middlewares=to-https"
|
# 定义URL中的scheme、port重定向中间件to-https,将http转换为https,8081转换为7443,但不转换IP地址部分
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
||||||
|
|
||||||
|
# 设置路由demo01-jib使用的中间件
|
||||||
|
- "traefik.http.routers.demo01-jib.middlewares=switch-domain"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
y9-share-net:
|
y9-share-net:
|
||||||
|
|
|
@ -34,14 +34,20 @@ services:
|
||||||
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
||||||
- "traefik.http.routers.demo01-native-ssl.tls=true"
|
- "traefik.http.routers.demo01-native-ssl.tls=true"
|
||||||
- "traefik.http.routers.demo01-native-ssl.entrypoints=web-ssl"
|
- "traefik.http.routers.demo01-native-ssl.entrypoints=web-ssl"
|
||||||
- "traefik.http.routers.demo01-native-ssl.rule=PathPrefix(`/demo01`)"
|
- "traefik.http.routers.demo01-native-ssl.rule=Host(`www.dingzhaojun.top`) && PathPrefix(`/demo01`)"
|
||||||
- "traefik.http.routers.demo01-native-ssl.service=demo01"
|
- "traefik.http.routers.demo01-native-ssl.service=demo01"
|
||||||
|
|
||||||
# HTTP 协议自动跳转 HTTPS
|
# 定义URL重定向中间件switch-domain,将http://localhost转换为https://www.dingzhaojun.top
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
- "traefik.http.middlewares.switch-domain.redirectregex.regex=^http://localhost(.*)"
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
- "traefik.http.middlewares.switch-domain.redirectregex.replacement=http://www.dingzhaojun.top$${1}"
|
||||||
#- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
|
||||||
#- "traefik.http.routers.demo01-jib.middlewares=to-https"
|
# 定义URL中的scheme、port重定向中间件to-https,将http转换为https,8081转换为7443,但不转换IP地址部分
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
||||||
|
- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
||||||
|
|
||||||
|
# 设置路由demo01-jib使用的中间件
|
||||||
|
- "traefik.http.routers.demo01-jib.middlewares=switch-domain"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
y9-share-net:
|
y9-share-net:
|
||||||
|
|
Loading…
Reference in New Issue