Rails production env routing issue

I have an annoying problem when i start rails in production mode. Rails
starts and is logging to the production log, however when i goto an
invalid URL i get an routing error page instead of a 404.

This happens with both mongrel and webrick (running rails 2.1 on
kubuntu).

Any ideas on why this is happening?

After another Google I found the problem -
http://www.ruby-forum.com/topic/44859. Changed localhost to my LAN ip in
nginx and everything is working like it should.