1. iis If you put it behind the reverse proxy , In the Journal c-ip It's a reverse proxy server ip, Not real users ip, Want to record the user's ip There are two things to do .
One . In reverse proxy settings X-Forwarded-For paragraph , The following is a nginx Configuration example under :
server

location

……
proxy_set_header

 
X-Forwarded-For  $proxy_add_x_forwarded_for;
……


Two . stay iis Install the following on the site isapi
filter, This thing is in the f5 Found on the development forum of , According to the developers , To solve the problem iis Put it in f5 The user cannot be recorded ip The problem of ,-_-#
Whatever the front end is f5 still nginx still squid still haproxy. Both can be used. . It should be good . Restart after installation iis Just like the .
http://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx

Look back iis Log , Inside c-ip It's already on the client side ip 了 .

2. this dll How to install and use files : Yes IIS Right click Properties of the site , open ISAPI Filter , Add the downloaded dll file , Remember that there are two downloaded files , One is x86, One is x64, They correspond to each other 32 Bit and 64 position , And both have F5XForwardedFor.dll Two versions , The official version and the development version , We should choose to use Release The official stable version of . 
If loading is not successful after adding , You can try in web Add service extension to service extension , take F5XForwardedFor.dll Add to the service extension , Set its status to enabled . The last restart iis that will do .

Kato :

The figure below shows how to add web Service extension :

Finally, test it .

 
 
 
 

stay IIS Two terms are often mentioned in the document of :ISAPI Extension and ISAPI Filter .

ISAPI Expand

ISAPI Expand (ISAPI Extension” It's a way to add to IIS In order to enhance Web Server function program , Its carrier is DLL file . Usually directly responsible for responding to HTTP request .

according to HTTP Request the resource extension to access ( adopt URL obtain ),IIS Will select specific ISAPI Extension to handle this request , This process is called “ Program mapping ”.  And for responding to HTTP The request is called “HTTP Handler(HTTP The handler )”.  chart  8‑11 It shows IIS 6 Program mapping in .

In the figure  8‑11 Can be seen in ,IIS Assign to ASP.NET Webpage ( Its extension is .aspx) The request will be made by aspnet_isapi.dll Handle ( chart  8‑12).

IIS 7 Program mapping and IIS 6 It's a little different . When IIS 7 With “ Classical mode ” Runtime , And IIS 6 The use of aspnet_isapi.dll Response to “.aspx” Request . But when IIS 7 With “ Integration mode ” Runtime , Then use the managed handler (System.Web.UI.PageHandlerFactory) Response to “.aspx” Request ( chart  8‑13).

2 ISAPI Filter

       “ISAPI Filter (ISAPI Filter) It is also a kind of DLL But I'm not responsible for dealing with HTTP request , The main function is to respond to certain events . When these things happen ISAPI The filter is called , It can modify incoming or outgoing HTTP data . stay IIS 7 in , Use “HTTP modular (HTTP Module) Instead of tradition ISAPI Functions of filters .

Be careful :ISAPI Expand with ISAPI The names of the filters are very similar , But in the IIS The status and role of the media are different .

Nginx Under reverse proxy IIS Get real IP More articles about

  1. Nginx Reverse proxy Tomcat Server get real IP problem

    1.nginx.conf To configure modify Server location To configure increase proxy_set_header X-Real-IP $remote_addr; # Keep the real client before the agent ip pro ...

  2. nginx The reverse proxy does not get the correct clientIP The problem is divergent

    The problem background : In the use of nginx The server NginxA To reverse proxy service WebAPIA,WebAPIA In order to obtain ClientIP, The result is IP by NginxA Of , This leads to the following series of concepts ... use first X ...

  3. nginx Reverse proxy Tomcat/Jetty Get the client IP Address

    Use nginx Acting as a reverse agent ,Tomcat The server and Jetty How does the server get the client real IP The address? ? First nginx Need configuration proxy_set_header, such JSP Use request.getHeader(& ...

  4. nginx Reverse proxy node.js Get the client IP

    Use Nginx do node.js The reverse proxy of the program , There will be such a problem : The client obtained in the program IP Forever 127.0.0.1 If you want to get a real client IP What should we do about it ? One . First configuration Nginx Reverse proxy of  proxy ...

  5. lookup “CDN、 Load balancing 、 Reverse proxy ” And so on IP Address method

    First ,CDN. Load balancing . Reverse proxy is also divided into many layers , Sometimes it's the outermost layer CDN Server cluster , Real machines are not open to the outside world , Something like that : user → CDN The Internet → One or more real machines CDN Server ...

  6. nginx Under reverse proxy thinkphp、php Can't get the right extranet ip

    Before recording the user sending SMS, you need to get the user ip when ,tp What we have been getting is the intranet ip:10.10.10.10 tp Framework acquisition ip Method :get_client_ip /** * Get the client IP Address * @param intege ...

  7. Nginx Reverse proxy +Tomcat+Springmvc Get user access ip

    Nginx+Tomcat+Springmvc Get user access ip 1.Nginx Reverse proxy   modify Nginx The configuration file location / { *********** Before the code *******; proxy_se ...

  8. Linux in Nginx Under reverse proxy tomcat colony

    Nginx With reverse proxy ( Notice the difference between forward code and forward code ) And load balancing . This time, Nginx Installed in the 192.168.1.108 The machine linux On the machine . install Nginx First of all, we have to install openssl library ,gcc,PCRE,z ...

  9. Use Nginx Reverse proxy Give Way IIS and Tomcat Waiting for multiple stations to take off

    Use Nginx Give Way IIS and Tomcat Waiting for multiple stations to take off Preface : Develop a good habit , Write it down after solving a problem , After all “ Better a good memory than a bad pen ”. It can also help more people isn't it? ? Recently, I have nothing to do , I'm writing a ...

Random recommendation

  1. Ubuntu 14.04 Next Django+MySQL The whole process of installation and deployment

    One . Brief steps .(Ubuntu14.04) Python install Django Mysql Installation and configuration Record my deployment process , It's also convenient for children's shoes in need , Great God do not spray ~ Two .Python Installation Because the environment that bloggers use is ...

  2. cordova stay app Open the link plug-in in the internal specified browser :cordova-plugin-inappbrowser

    Original website :http://www.ncloud.hk/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/cordova-plugin-inappbrowser/ If you want to App Inside ...

  3. Java And ByteArrayInputStream and ByteArrayOutputStream- Classes that manipulate byte arrays

    ByteArrayInputStream and ByteArrayOutputStream Source : An array of bytes in memory Purpose : An array of bytes in memory These two stream objects do not involve calls to underlying resources , The operations are all arrays in memory , So no need ...

  4. mysql Storage engine myisam innodb difference

    although MySQL The storage engine in is not just MyISAM And InnoDB these two items. , But it's the two that are commonly used . Maybe some stationmaster didn't notice MySQL Storage engine for , In fact, storage engine is also a key point in database design , So what kind of storage index should blog system use ...

  5. C# Read XML The configuration file

    DataSource.xml file , Put it on bin/debug/ Under the table of contents : <?xml version="1.0" encoding="utf-8" ?> ...

  6. Windows Azure The open source DNA

    At the end of last year , The second phase of Microsoft cloud accelerator was officially launched in China ,17 Three startups were selected . Relying on Cloud Computing HTML 5 Professional rich media animation platform Mugeda( Enjoy yourself ) Is one of them . Microsoft cloud accelerator provides a lot of support for startups , but Mugeda ...

  7. linux A detailed explanation of common orders ( Two ) File processing command

    ◆ File processing command :file.mkdir.grep.dd.find.mv.ls.diff.cat.ln: System information is stored in files , Documents are similar to ordinary official documents . Each file has its own name . Content . Storage address and other ...

  8. Codeforces Round #254 (Div. 1)-A,B

    A: Just choose two points on one side , It's very obvious that I can think of ... But I got the wrong question at the beginning ,sad.... #include<stdio.h> #include<string.h> #includ ...

  9. SqlServer Send E-mail , Time work

    I did some research by accident today sqlserver The function of sending e-mail , I've heard about it before , But I never tried , Just use C# Write background program to send e-mail . Now there's another way to send mail . The general steps are as follows : 1. To configure sqlserve ...

  10. C++-int Processing of type integer out of range

    Recently I did a topic : Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: ...