Show real IP in nginx log file

In the log file, all visitor IP are come from 172.19.0.2,
I saw there’s default real_IP settings in nginx.conf, but I think it doesn’t work

set_real_ip_from      0.0.0.0/0;
real_ip_header  X-Forwarded-For;