Here's an example of the URLs that don't work:
http://domain/do?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fperson
http://domain/do?url=http%3A%2F%2Fwww.linkedin.com%2F
However, the following URL does work:
http://domain/do?url=http%3A%2F%2Fwww.linkedin.com
Also, this only happens with Nginx, using Passenger with Apache it works fine, but we use Nginx on our production machines.
Here's the entry in Nginx's error log:
2009/12/01 09:30:51 [error] 6407#0: *136 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: domain, request: "GET /do?url=http%3A%2F%2Fwww.linkedin.com%2F HTTP/1.1", upstream: "passenger://unix:/tmp/passenger.6335/master/helper_server.sock:", host: "domain"
Best Answer
It has nothing to do with Nginx or Passenger.
There was a library that takes and uses a URL wasn't working with the Ruby version on our production server. For some odd reason it was causing Rails to fail so catastrophically that the only erros were in Nginx's error log.