From tomhaa at gmail.com Mon Sep 11 11:15:22 2006 From: tomhaa at gmail.com (Tom Henrik Aadland) Date: Mon, 11 Sep 2006 12:15:22 -0300 Subject: [Railstat-list] Great tool but mongrel problems. Message-ID: <4b132a670609110815i1b928d2bn66d8b3b193e58a14@mail.gmail.com> Hi, I would first say this tool looks really nice. The only problem I have is that I can't seem to get it to work on my apache/mongrel setup. It works fine just for testing using webrick, but on a live server webrick is not an option. Is there any reason that this shouldn't work with mongrel? Thanks and keep up the good work. Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/railstat-list/attachments/20060911/7a95c37c/attachment.html From lubo at manolov.org Mon Sep 11 11:30:04 2006 From: lubo at manolov.org (Luben Manolov) Date: Mon, 11 Sep 2006 18:30:04 +0300 Subject: [Railstat-list] Great tool but mongrel problems. In-Reply-To: <4b132a670609110815i1b928d2bn66d8b3b193e58a14@mail.gmail.com> References: <4b132a670609110815i1b928d2bn66d8b3b193e58a14@mail.gmail.com> Message-ID: <5ad854c30609110830u6182950dyb79a5e690c80b9dd@mail.gmail.com> Hi Tom, > I would first say this tool looks really nice. The only problem I have is > that I can't seem to get it to work on my apache/mongrel setup. It works > fine just for testing using webrick, but on a live server webrick is not an > option. Is there any reason that this shouldn't work with mongrel? I guess you are using apache with mod_proxy or mod_proxy_balancer? It turns out that RailStat does not work in this deployment scenario because @request.env['HTTP_HOST'] returns 127.0.0.1. The solution is to replace this line from rail_stat_controller.rb: if @request.env['HTTP_REFERER'] and @request.env['HTTP_REFERER'].include?(@request.env['HTTP_HOST']) with if @request.env['HTTP_REFERER'] and @request.env['HTTP_REFERER'].include?(request.host) I hope that this will help in your case. Best regards, Luben From tomhaa at gmail.com Mon Sep 11 11:46:55 2006 From: tomhaa at gmail.com (Tom Henrik Aadland) Date: Mon, 11 Sep 2006 12:46:55 -0300 Subject: [Railstat-list] Great tool but mongrel problems. In-Reply-To: <5ad854c30609110830u6182950dyb79a5e690c80b9dd@mail.gmail.com> References: <4b132a670609110815i1b928d2bn66d8b3b193e58a14@mail.gmail.com> <5ad854c30609110830u6182950dyb79a5e690c80b9dd@mail.gmail.com> Message-ID: <4b132a670609110846r578ea9f5ie1831e7ca94efced@mail.gmail.com> Hi Lube, You were absolutely right, the referer was the problem and now it works like a charm. Thanks a lot. Tom On 9/11/06, Luben Manolov wrote: > > Hi Tom, > > > I would first say this tool looks really nice. The only problem I have > is > > that I can't seem to get it to work on my apache/mongrel setup. It works > > fine just for testing using webrick, but on a live server webrick is not > an > > option. Is there any reason that this shouldn't work with mongrel? > > I guess you are using apache with mod_proxy or mod_proxy_balancer? It > turns out that RailStat does not work in this deployment scenario > because @request.env['HTTP_HOST'] returns 127.0.0.1. > > The solution is to replace this line from rail_stat_controller.rb: > > if @request.env['HTTP_REFERER'] and > @request.env['HTTP_REFERER'].include?(@request.env['HTTP_HOST']) > > with > > if @request.env['HTTP_REFERER'] and > @request.env['HTTP_REFERER'].include?(request.host) > > I hope that this will help in your case. > > Best regards, > > Luben > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/railstat-list/attachments/20060911/a22a2f9b/attachment.html From tomhaa at gmail.com Mon Sep 11 12:25:43 2006 From: tomhaa at gmail.com (Tom Henrik Aadland) Date: Mon, 11 Sep 2006 13:25:43 -0300 Subject: [Railstat-list] Great tool but mongrel problems. In-Reply-To: <5ad854c30609110830u6182950dyb79a5e690c80b9dd@mail.gmail.com> References: <4b132a670609110815i1b928d2bn66d8b3b193e58a14@mail.gmail.com> <5ad854c30609110830u6182950dyb79a5e690c80b9dd@mail.gmail.com> Message-ID: <4b132a670609110925r1e689831uc2ae22070266a934@mail.gmail.com> Hi again Luben, just a quick question, how often is that ip-to-country list updated, or who is updating it? I'm on a 201.. domain in Argentina which is not in the list. Regards, Tom On 9/11/06, Luben Manolov wrote: > > Hi Tom, > > > I would first say this tool looks really nice. The only problem I have > is > > that I can't seem to get it to work on my apache/mongrel setup. It works > > fine just for testing using webrick, but on a live server webrick is not > an > > option. Is there any reason that this shouldn't work with mongrel? > > I guess you are using apache with mod_proxy or mod_proxy_balancer? It > turns out that RailStat does not work in this deployment scenario > because @request.env['HTTP_HOST'] returns 127.0.0.1. > > The solution is to replace this line from rail_stat_controller.rb: > > if @request.env['HTTP_REFERER'] and > @request.env['HTTP_REFERER'].include?(@request.env['HTTP_HOST']) > > with > > if @request.env['HTTP_REFERER'] and > @request.env['HTTP_REFERER'].include?(request.host) > > I hope that this will help in your case. > > Best regards, > > Luben > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/railstat-list/attachments/20060911/3a8c6948/attachment.html