I'm trying to use traefik as a reverse proxy to nifi which is listing on port 8443:
services:
nifi:
image: apache/nifi:2.0.0-M4
ports:
- 8443:8443
restart: unless-stopped
volumes:
- ./vastdb_nifi-1.0.2-linux-x86_64-py39.nar:/opt/nifi/nifi-current/nar_extensions/
environment:
NIFI_WEB_PROXY_HOST: localhost:80, vastdb-ingest:80
SINGLE_USER_CREDENTIALS_USERNAME: admin
SINGLE_USER_CREDENTIALS_PASSWORD: 123456123456
labels:
- "traefik.http.routers.nifi.loadbalancer.rule=Host(`localhost`)"
- "traefik.http.services.nifi.loadbalancer.server.port=8443"
traefik:
image: traefik:v3.1
ports:
- "80:80"
- "8080:8080"
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- /var/run/docker.sock:/var/run/docker.sock
command: --api.insecure=true --providers.docker
restart: unless-stopped
depends_on:
- nifi
and
vast_nifi_docker_compose $ cat traefik.yml
http:
routers:
nifi:
entrypoints:
- nifi
service: nifi
# middlewares:
# - addforwardheaders
services:
nifi:
loadbalancer:
servers:
- url: "https://nifi-vast-nifi-docker-compose:8443"
# middlewares:
# addforwardheaders:
# headers:
# X-Forwarded-Host:
# - expr: "localhost"
# X-Forwarded-Port:
# - expr: "8443"
# X-Forwarded-Proto:
# - expr: "https"
#
#tls:
# stores:
# default:
# defaultCertificate:
# certFile: ""
# keyFile: ""
log:
level: DEBUG
accessLog:
filePath: "/var/log/access.log"
entryPoints:
web:
address: ":80"
nifi:
address: ":8080"
providers:
docker:
useBindPortIP: true
Requests aren't getting routed:
vast_nifi_docker_compose $ curl -v http://localhost:80/nifi
* Trying 127.0.0.1:80...
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /nifi HTTP/1.1
> Host: localhost
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Tue, 24 Sep 2024 23:29:12 GMT
< Content-Length: 19
<
404 page not found
* Connection #0 to host localhost left intact
I'm seeing the requests in the access.log but that's all that seems to happen.
Apologies if this is a basic question, this is my first experience with traefik.
Thanks!