歡迎您光臨本站 註冊首頁

請問Nginx如何傳遞客戶端IP到後端web伺服器?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

請問Nginx如何傳遞客戶端IP到後端web伺服器?

目前架設了一台freebsd 8.0,nginx 0.7.6.5,IPFW做反向代理。
後端為windows 2003 IIS。

在nginx的配置中
proxy_set_header   Host             $host;
proxy_set_header   X-Real-IP        $remote_addr;
proxy_set_header   X-Forwarded-For  $remote_addr;
proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
server
     {
             listen       80;
             server_name mmmmmaa.com  ;

             location / {
             proxy_pass http://192.168.1.90;
                         }
       }
在後端192.168.1.90上的IIS日誌中的客戶端IP只能看到反向代理伺服器的地址,請問
nginx中如何配置才能在後端中看到客戶的真實IP?謝謝。
《解決方案》

http://blog.chinaunix.net/u3/95758/showart_1917000.html
:mrgreen:

被拉過來的
《解決方案》

看看這個了:http://www.cdnunion.com/cdninfo/cdnunion_2009_06_11_195.htm

[火星人 ] 請問Nginx如何傳遞客戶端IP到後端web伺服器?已經有390次圍觀

http://coctec.com/docs/service/show-post-17225.html