Forum: Mongrel MONGREL HANDLER

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8db87fffef7497d3ce5a2b06e57782de?d=identicon&s=25 Sathish Sundaram (sathish_303)
on 2009-01-08 14:17
When i try to get the remote address of the system ,its returning only
the proxy server ip or localhost ip address.But i need the service
provider ip address of the system.Is there is any http header
variables,because i used (['REMOTE_ADDR']
,['SERVER_NAME'],['REMOTE_HOST'],['SERVER_PORT'],['HTTP_HOST']) nothing
works for me . I need the solution for this can you please suggest with
me the solution.

thanks,
7e85c8b066ffb802cba005e90c6c616e?d=identicon&s=25 Piyush Ranjan (Guest)
on 2009-01-08 15:47
(Received via mailing list)
You will not get these things from any of those variables. If you are
using
Apache look for "set X-FORWARDED-FOR". In fact X-FF can be used to get
ip
address for many http servers. More info at
http://en.wikipedia.org/wiki/X-Forwarded-For
0f50b9a2ad85666d537d39bda49327ee?d=identicon&s=25 Jonathan Rochkind (jrochkind)
on 2009-01-08 19:09
(Received via mailing list)
Hmm, I've never had this problem with a Mongrel in front of Rails via
Apache, using the standard Apache mod_proxy reverse proxy setup for
apache and mongrel.

My guess is that that mod_proxy in apache will automatically set
X-FORWARDED-FOR without the need for any special setup beyond the
reverse proxy setup; and that Rails will also automatically use that
x-ff header.  But I've never looked into it, because I didn't need, it
just worked.

If you are not using apache and/or not using Rails, your mileage may
very. What is your environment?

Jonathan

Piyush Ranjan wrote:
>> the proxy server ip or localhost ip address.But i need the service
>> Mongrel-users mailing list
> Mongrel-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

--
Jonathan Rochkind
Digital Services Software Engineer
The Sheridan Libraries
Johns Hopkins University
410.516.8886
rochkind (at) jhu.edu
This topic is locked and can not be replied to.