Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Apache Nifi behind Traefik as a reverse proxy

Apache Nifi behind Traefik as a reverse proxy

New Contributor

I'm using Traefik as a reverse proxy for a lot of services and for tls termination. This works properly excepted Nifi. When trying to forward incomming requests to Nifi I get "Bad Gateway" responses. Does anybody have an idea how to fix that?

Thanks a lot

 

 

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"

 

1 REPLY 1
Highlighted

Re: Apache Nifi behind Traefik as a reverse proxy

New Contributor

Any idea??

Don't have an account?
Coming from Hortonworks? Activate your account here