gpt4 book ai didi

docker - Traefik背后的Apache Nifi作为反向代理

转载 作者:行者123 更新时间:2023-12-02 19:49:17 25 4
gpt4 key购买 nike

我将Traefik用作许多服务和tls终止的反向代理。除Nifi之外,此功能均正常运行。尝试将传入请求转发到Nifi时,我收到“错误的网关”响应。
有人知道如何解决这个问题吗?

非常感谢 :-)

traefik:
image: "traefik:v2.2"
container_name: "traefik"
restart: always
networks:
- monitoring
- website
- iot
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
#s- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=test@test.de"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
# prom metrics
- "--metrics.prometheus=true"
---
nifi:
image: apache/nifi:latest
container_name: nifi
restart: on-failure
environment:
- NIFI_WEB_PROXY_CONTEXT_PATH=/
- NIFI_WEB_HTTP_PORT= 8080
expose:
- 8080
networks:
- iot
labels:
- "traefik.enable=true"
- "traefik.http.routers.nifi.rule=Host(`nifi.example.de`)"
- "traefik.http.routers.nifi.entrypoints=web"

- "traefik.http.routers.nifi.middlewares=nifi-auth"
# Basic Auth
- "traefik.http.middlewares.nifi-auth.basicauth.users=admin:$$xyz$$xyz$$xyz"

任何的想法?? :-)

最佳答案

由于为ui等打开了多个端口,因此需要使用(例如)定义路由端口:

 - "traefik.http.services.nifi.loadbalancer.server.port=8080"

关于docker - Traefik背后的Apache Nifi作为反向代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61929319/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com