Hi I''ve got Lighttpd and Mongrel setup on OS X It works great when I have Lighty listening on 0.0.0.0:3000 and mongrel on port 3001 BUT, when I bind lighty to 10.1.1.2:80 (the IP of my ethernet address) it goes very very slow and static content (images, static html) does not transfer at all :( What might be causing this? I notice that Apache has no trouble serving content on the same IP as the local ethernet address... and also webrick does it fine... so obviously there is some kind of conflict within Lighty or Mongrel? thanks for any ideas :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Why not just bind lighttpd to 0.0.0.0:80? Unless you have more than one NIC, there''s no reason not to AFAIK. This past week I''ve been working with mongrel/lighttpd, and it seems to run very fast, the static files are 90% as fast as with lighttpd on its own. Do you have your proxy set up correctly? This is the section from my config file, and I don''t need to have any special directives in there telling lighttpd to skip proxying for statics. In fact, lighttpd doesn''t have to know anything about the app at all - just where to proxy to. proxy.balance = "fair" proxy.server = ( "/" => ( ( "host" => "127.0.0.1", "port" => 3000 ), ... ( "host" => "127.0.0.1", "port" => 3009 ) ) ) Jason Bowerman wrote:> > Hi > > I''ve got Lighttpd and Mongrel setup on OS X > > It works great when I have Lighty listening on 0.0.0.0:3000 and > mongrel on port 3001 > > BUT, when I bind lighty to 10.1.1.2:80 (the IP of my ethernet address) > it goes very very slow and static content (images, static html) does > not transfer at all :( > > What might be causing this? > > I notice that Apache has no trouble serving content on the same IP as > the local ethernet address... and also webrick does it fine... so > obviously there is some kind of conflict within Lighty or Mongrel? > > thanks for any ideas :) > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the reply Jason, Finally worked out that my problem was that Mongrel did not have read access for my static/cached files. So, Lighttpd would stall waiting for Mongrel to dish out the content, and eventually serve broken content. After fixing the read permissions, I wanted to make Lighttpd handle all the static files... which is what I hoped it would do out of the box. However, there is extra compilation to do in order to get Lighttpd to "know" to deliver static stuff itself rather than proxying to Mongrel. (See bottom half of http:// mongrel.rubyforge.org/docs/lighttpd.html) Too lazy to go deeper with Lighttpd, I decided to try Nginx..... and it works beautifully and painlessly :) If anyone is interested, switching took me about 5 minutes after following this: http://brainspl.at/articles/2006/09/12/new-nginx- conf-with-rails-caching Jas On 21/12/2006, at 5:59 AM, Jason Norris wrote:> > Why not just bind lighttpd to 0.0.0.0:80? Unless you have more than > one NIC, there''s no reason not to AFAIK. > This past week I''ve been working with mongrel/lighttpd, and it > seems to run very fast, the static files are 90% as fast as with > lighttpd on its own. Do you have your proxy set up correctly? This > is the section from my config file, and I don''t need to have any > special directives in there telling lighttpd to skip proxying for > statics. In fact, lighttpd doesn''t have to know anything about the > app at all - just where to proxy to. > > proxy.balance = "fair" > proxy.server = ( "/" => > ( > ( "host" => "127.0.0.1", "port" => 3000 ), > ... > ( "host" => "127.0.0.1", "port" => 3009 ) > ) ) > > > Jason Bowerman wrote: >> >> Hi >> >> I''ve got Lighttpd and Mongrel setup on OS X >> >> It works great when I have Lighty listening on 0.0.0.0:3000 and >> mongrel on port 3001 >> >> BUT, when I bind lighty to 10.1.1.2:80 (the IP of my ethernet >> address) >> it goes very very slow and static content (images, static html) does >> not transfer at all :( >> >> What might be causing this? >> >> I notice that Apache has no trouble serving content on the same IP as >> the local ethernet address... and also webrick does it fine... so >> obviously there is some kind of conflict within Lighty or Mongrel? >> >> thanks for any ideas :) >> >> > >> > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---