Nginx Sock And Rails Envinroment Error

Alex Barlow alexbarlowis at
Thu Feb 18 05:26:32 EST 2010

Cool, thanxs for your support and great software.

I get about 40 requests per second on a 1.7 gb instance with the db on the same host. Thats awesome!

Well, i think so..


On 17 Feb 2010, at 23:35, Eric Wong wrote:

> Alex Barlow <alexbarlowis at> wrote:
>> Fixed it!
>> Rails was considering all requests to be local. As the request was
>> coming from the local ip (from nginx i assume)
> Awesome.
> Good to know, I've been setting these headers for so long that it's
> become second nature and I've forgotten about side effects with Rails
> error messages :x
>> i put these headers in nginx
>>     proxy_set_header  X-Real-IP  $remote_addr;
> You probably don't need X-Real-IP, actually, it's quite nginx-specific
> and X-Forwarded-For covers you.
>>      proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
>>      proxy_set_header Host $http_host;
>>      proxy_redirect false

More information about the mongrel-unicorn mailing list