Welcome! Log In Create A New Profile

Advanced

Re: Передача реального IP через Nginx на MS IIS сервер

Илья Шипицин
September 07, 2017 05:38AM
7 сентября 2017 г., 13:20 пользователь RockerMan <
nginx-forum@forum.nginx.org> написал:

> Добрый день
>
> Есть nginx, работающий в качестве реверс-прокси. За ним стоит MS IIS. У
> него
> в логах запросы от клиента идут не от внешнего клиентского IP адреса, а от
> адреса Nginx. В настройках nginx проброс реального IP прописан:
> -
> location / {
> proxy_pass https://*.*.*.*/clientproxy/;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for,$remote_addr;
> }
> -
> В случае Apache в качестве бэкенд сервера рекомендуют на нем установить и
> настроить:
> -
> Forwarding real remote IP from nginx to apache actually requires
> mod_remoteip module installed & enabled in httpd.conf on the apache side.
> Required proxy_set_header options in the server block:
> server {
> ...
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> ...
> }
>
> On the apache side you should enable the required module with:
> LoadModule remoteip_module modules/mod_remoteip.so
>
> and set this directives:
> RemoteIPHeader X-Real-IP
> RemoteIPInternalProxy 127.0.0.1
>
> replace 127.0.0.1 with your nginx IP if needed...
> -
>
> Знатоки IIS, подскажите плз, есть у него аналогичный модуль? и как его
> настроить, если такой имеется?
>


1. штатно (начиная с 8-й версии)

https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-85/enhanced-logging-for-iis85

2. модуль логирования (для предыдущих версий)

https://www.iis.net/downloads/microsoft/advanced-logging

3. arr helper

https://blogs.iis.net/anilr/client-ip-not-logged-on-content-server-when-using-arr


>
> Спасибо.
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?21,276283,276283#msg-276283
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Передача реального IP через Nginx на MS IIS сервер

RockerMan September 07, 2017 04:20AM

Re: Передача реального IP через Nginx на MS IIS сервер

Илья Шипицин September 07, 2017 05:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 220
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