Rajiv Sankranti
2007-Nov-23 22:22 UTC
[Mongrel] help! problem with mongrel, request.remote_ip and lighttpd
I have an existing rails application on lighttpd and I am trrying to upgrade to mongrel for the enhanced scalability it offers. I am running mongrel 1.1.1, rails 1.2.5, lighttpd 1.4.13 and ruby 1.8.5 Everything is working great except request.remote_ip returns 127.0.0.1 or 192.168.0.102 (the internal network address of the server running lighty). I''ve seen some older posts about this problem and it appears lighttpd is the culprit. Will pound solve this problem? Is there a way to get this working with lighttpd or do I need to use another webserver? Please help! Thanks, Raj.
Anton Tuzovo
2007-Nov-27 08:51 UTC
[Mongrel] help! problem with mongrel, request.remote_ip and lightt
I have the same problem on Apache 2.2 + load_balancer + mongrel 1.1.1. So, i think it is mongrel 1.1.1 problem. Because mongrel 1.0.1 work fine. Rajiv Sankranti wrote:> Is there a way to get this working with lighttpd or do I need to use > another > webserver? > > Please help! > > Thanks, > Raj.-- Posted via http://www.ruby-forum.com/.
Wayne E. Seguin
2007-Nov-28 05:35 UTC
[Mongrel] help! problem with mongrel, request.remote_ip and lighttpd
On Nov 23, 2007 5:22 PM, Rajiv Sankranti <rajiv at fleeteyes.com> wrote:> I have an existing rails application on lighttpd and I am trrying to > upgrade > to mongrel for the enhanced scalability it offers. > > I am running mongrel 1.1.1, rails 1.2.5, lighttpd 1.4.13 and ruby 1.8.5 > > Everything is working great except request.remote_ip returns 127.0.0.1 or > 192.168.0.102 (the internal network address of the server running lighty). > > I''ve seen some older posts about this problem and it appears lighttpd is > the > culprit. Will pound solve this problem? > > Is there a way to get this working with lighttpd or do I need to use > another > webserver? > > Please help! > > Thanks, > Raj. >Raj, Lighttpd would be the culprit on that yes, I don''t use it personally so .... anyone else know how to pass the domain through when using lighttpd? ~Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071128/31f62b3b/attachment.html
Rajiv Sankranti
2007-Nov-28 05:38 UTC
[Mongrel] help! problem with mongrel, request.remote_ip and lighttpd
Wayne, Thanks for the response. I found that lighttpd forwards the remote address in HTTP_X_FORWARDED_FOR. I was able access it by using request.env[''HTTP_X_FORWARDED_FOR''] in the rails application. On November 27, 2007 09:35:04 pm Wayne E. Seguin wrote:> On Nov 23, 2007 5:22 PM, Rajiv Sankranti <rajiv at fleeteyes.com> wrote: > > I have an existing rails application on lighttpd and I am trrying to > > upgrade > > to mongrel for the enhanced scalability it offers. > > > > I am running mongrel 1.1.1, rails 1.2.5, lighttpd 1.4.13 and ruby 1.8.5 > > > > Everything is working great except request.remote_ip returns 127.0.0.1 or > > 192.168.0.102 (the internal network address of the server running > > lighty). > > > > I''ve seen some older posts about this problem and it appears lighttpd is > > the > > culprit. Will pound solve this problem? > > > > Is there a way to get this working with lighttpd or do I need to use > > another > > webserver? > > > > Please help! > > > > Thanks, > > Raj. > > Raj, > > Lighttpd would be the culprit on that yes, I don''t use it personally so > .... > > anyone else know how to pass the domain through when using lighttpd? > > ~Wayne-- Rajiv Sankranti FleetEyes Tel: 604 512 9629 Fax: 604 357 1175 1102-5051 Lougheed Hwy, Burnaby, BC V5B 4T5 www.fleeteyes.com rajiv at fleeteyes.com
Wayne E. Seguin
2007-Nov-29 05:13 UTC
[Mongrel] help! problem with mongrel, request.remote_ip and lighttpd
On Nov 28, 2007 12:38 AM, Rajiv Sankranti <rajiv at fleeteyes.com> wrote:> Wayne, > > Thanks for the response. I found that lighttpd forwards the remote address > in > HTTP_X_FORWARDED_FOR. > > I was able access it by using > request.env[''HTTP_X_FORWARDED_FOR''] in the rails application. >Raj, Awesome, Thank you for posting your solution back to the list! ~Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071129/70c5c01a/attachment.html