Let IIS record the real Ip_win server Nginx reverse Proxy

Source: Internet
Author: User
Tags nginx reverse proxy

First, set up x-forwarded-for paragraph

Nginx Configuration Example:

Copy Code code as follows:
Server
{
Location
{
...
Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;
...


Ii. Installing ISAPI filter on the IIS site

Found in the F5 Development Forum, according to the developer's words, is to solve the IIS placed in the F5 after the issue of User IP records, whether the front end is F5 or nginx or squid or haproxy, can be used.
Restart IIS after loading.

Https://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx

The installation method, copied from the official document come over, everybody look slightly.
Installation

Follow These steps to install the filter.

Download and unzip the f5xforwardedfor.zip distribution.
Copy the F5XForwardedFor.dll file from the X86\release or X64\release directory (depending in your platform) into a target directory on your system. Let ' s say C:\ISAPIFilters.
Ensure that's containing directory and the F5XForwardedFor.dll file have read permissions by the IIS process. It ' s easiest to just give full read access to everyone.
Open the IIS Admin utility and navigate to the Web server you would like to apply it to.
For IIS6, right click on your Web server and select Properties. Then Select the ISAPI Filters tab. From there click the ' Add ' button and enter ' F5xforwardedfor ' for the Name and the ' path to the ' file C:\ISAPIFilters\F5XFo RwardedFor.dll "to the" executable field and click OK enough The Times to exit the property dialogs. At this point the filter should is working for you. Can go back into the property dialog to determine whether the "filter is active or" an error occurred.
For II7, your ' ll want to select your website and then double click ' ISAPI Filters ' icon that shows up in the Feature S View. In the Actions Pane on the right select the "Add" link and enter "F5xforwardedfor" for the name and "C:\ISAPIFilters\F5XFo RwardedFor.dll "for the executable. Click OK and are set to go.
I ' d love to hear feedback in this and if there are any other feature request, I ' m wide open to suggestions. The source code is included in the download distribution so if you do any changes yourself, let me know!

Good luck and happy filtering!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.