Skip to content

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

Description

@ashish235

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions