Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-27, 12:30:15

Author Topic: Nginxproxy 127.0.0.1  (Read 4328 times)

0 Members and 1 Guest are viewing this topic.

Offline LotsOfQ

  • Master
  • **
  • Posts: 462
  • Karma: +1/-0
    • View Profile
Nginxproxy 127.0.0.1
« on: 2015-05-30, 18:47:43 »
I am running nginxproxy. I googled and found out that apps like prosper202 that log ip are not able to but instead get 127.0.0.1. Is there anyway to fix this?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginxproxy 127.0.0.1
« Reply #1 on: 2015-05-30, 22:50:27 »
Nginx-proxy mean nginx in front and httpd (apache) in backup where php processed by httpd. So, application didn't nginx but httpd.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline LotsOfQ

  • Master
  • **
  • Posts: 462
  • Karma: +1/-0
    • View Profile
Re: Nginxproxy 127.0.0.1
« Reply #2 on: 2015-05-31, 04:32:39 »
I didn't realized that 2 of my applications after I switch to nginx-proxy all the ip now logged as 127.0.0.1 instead of the actual visitor's ip. I switch back to Apache then the apps logged normal visitor's ip again.

I also found this from prosper202 forum but have no idea what it means. But this is what lead me to realize it's nginx-proxy issue.

Quote

hey, sorry if this was posted before -- I searched and couldn't find anything

I'm runing p202 behind a reverse proxy and when tracking visitor IP it only shows 127.0.0.1 (which is the IP of the reverse proxy which is on the same host). It's basically an Nginx proxies to Apache type of thing.

Now, Nginx does forward the original ip in the HTTP_X_FORWARDED_FOR header but how do I get P202 to read that? Is there an elegant solution or should I just hack that in?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginxproxy 127.0.0.1
« Reply #3 on: 2015-05-31, 08:09:05 »
It's prosper202 issue rather than nginx-proxy. No issue for wordpress as I know.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline LotsOfQ

  • Master
  • **
  • Posts: 462
  • Karma: +1/-0
    • View Profile
Re: Nginxproxy 127.0.0.1
« Reply #4 on: 2015-06-02, 09:52:54 »
I also have another application that log user ip and it does the same thing. It logged 127.0.0.1 for user's ip. The same thing is true if I switch back to Apache then it works as normal.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginxproxy 127.0.0.1
« Reply #5 on: 2015-06-02, 12:12:16 »
It's related to applications issue rather than nginx-proxy itself.

Application must read 'HTTP_X_FORWARDED_FOR' if exists instead 'REMOTE_ADDR'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.028 seconds with 18 queries.

web stats analysis