大佬教程收集整理的这篇文章主要介绍了在反向代理和服务之间使用 HTTPS 进行通信,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我已经看到许多示例展示了如何加密终止于反向代理的请求,但我还没有看到在将请求转发到服务之前重新加密请求的工作示例。
我正在使用 traefik v2.4 和自签名证书。我可以通过端口 443 代理我主机上的所有内容,但我的每个服务仍然通过纯文本公开在我的内部网络上。
基本上:
客户端 traefik 服务
我想要这个:
客户端 traefik https --> 服务
我在 docker-compose.yml
文件中使用 Cli 参数和标签来配置 Traefik:
misp:
image: misp:latest
build:
context: ./services/misp
environment:
- USE_SSL=enabled
networks:
- my_proxy
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.services.misp.loadbalancer.server.port=80" # <-- I'm trying to reference the MISP container's port here
- "traefik.http.services.misp.loadbalancer.server.scheR_72_11845@e=https" # <-- Can I do this to force the MISP container to use httpS?
- "traefik.docker.network=my_proxy"
# httpS
- "traefik.http.routers.misp-secured.rule=Host(`misp.localhost`)"
- "traefik.http.routers.misp-secured.entrypoints=proxy"
- "traefik.http.routers.misp-secured.tls=true"
volumes:
- ./certs:/certs # Do I need to map self-signed certs here?
traefik:
image: traefik:latest
restart: always
ports:
- "443:443"
command:
- --provIDers.docker=true
- --provIDers.docker.exposedbydefault=false
- --provIDers.docker.watch=true
- --provIDers.docker.swarmMode=true
- --provIDers.file.filename=/dynamic.yml
- --provIDers.file.watch=true
- --provIDers.docker.network=my_proxy
- --entrypoints.proxy-secured.address=:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./dynamic.yml:/dynamic.yml
- ./certs:/certs
networks:
- my_proxy
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的在反向代理和服务之间使用 HTTPS 进行通信全部内容,希望文章能够帮你解决在反向代理和服务之间使用 HTTPS 进行通信所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。