traefik some note

php real ip issue:

Use $_SERVER[‘HTTP_X_FORWARDED_FOR’] instead of $_SERVER[‘REMOTE_ADDR’] for php if using traefik as loadbalancer, or 172.X.X.X internal IP is return rather than real ip

http redirect

if need http→https

put this label under traefik service in docker compose and remember set traefik.enable=true


if you want the dashboard, see this: