dockerfile / nginx

Nginx Dockerfile for trusted automated Docker builds.
http://dockerfile.github.io/#/nginx
MIT License
478 stars 540 forks source link

Can't get the real client IP to my web-servers. #17

Open ashish235 opened 9 years ago

ashish235 commented 9 years ago

I 've the below config.

server { listen 8080; location / { proxy_pass http://backend; proxy_redirect off; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; set_real_ip_from 172.16.131.253; real_ip_header X-Forwarded-For; real_ip_recursive on;

But it's not working and I 'm still getting the IP of my host reaching the webservers. I think the http_realip_module module is not built in.

Can you compile the nginx from source with some common modules like http_realip_module, http_geoip_module, http_ssl_module etc? It would be of great help.

ashish235 commented 9 years ago

Can anyone help here?