Hiii.,..
I need help, I have problem running Traefik on Centos. I tried to use mode: host
to get client IP address.
However it doest work on Centos machine but working just fine with Ubuntu.
I need to get client real IP address from nginx. Internet ----> Traefik ---> Nginx
this is my docker-compose.yaml
services:
traefik:
image: traefik:v2.8
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
command:
- --providers.docker=true
- --providers.docker.swarmmode=true
- --providers.docker.exposedbydefault=false
- --providers.file.directory=/etc/traefik/dynamic-configs
- --providers.file.watch=true
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --accesslog
- --log
- --api
as many suggestion, I need to use mode: host
however, if I use mode : host
, traefik doesnt forward the request to Nginx. there are no error on the logs. is there any workaround to solve this problem.