Welcome! Log In Create A New Profile

Advanced

Re: nginx not showing client ip

Jonathan Matthews
November 09, 2012 10:24AM
On 9 November 2012 13:11, piyushbj <nginx-forum@nginx.us> wrote:
> Dear All,
>
> I have setup nginx reverse proxy with IIS webserver.
>
> Client ---> Nginx RP ---> IIS 7
>
> But i am unable to get client ip on IIS server's log. i am getting Ngnix
> server's ip.

That's because the nginx server *is* the one making the connection to
the IIS instance.

You need to teach your application about the X-Forwarded-For (X-F-F)
HTTP header, or tell IIS to log this header in place of the client IP.
Failing that, you could look at using something like
https://devcentral.f5.com/weblogs/Joe/archive/2009/12/23/x-forwarded-for-http-module-for-iis7-source-included.aspx
, but that's kind of overkill IMHO.

For all of these, you'll need to add the client's IP to the X-F-F
header in nginx. A bit of very simple googling should teach you how to
achieve this.

HTH,
Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx not showing client ip

piyushbj November 09, 2012 08:11AM

Re: nginx not showing client ip

Jonathan Matthews November 09, 2012 10:24AM

Re: nginx not showing client ip

piyushbj November 12, 2012 06:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 261
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready