Rails XSendfile via Nginx

Ari King lists at ruby-forum.com
Mon May 7 22:53:39 UTC 2012


Hi,

I'm trying to configure nginx to serve a video file on behalf of my
rails 3 backend using xsendfile. I want rails to redirect the request
for http://myapp.com/recipes/1/video to nginx to handle. Unfortunately,
my current configuration results in a 404 (page not found) error. I've
pasted my nginx configuration at http://pastebin.com/VA4QFM35

Does anyone know what could be wrong?

Note: I have activated X-Accel-Redirect in rails by:

# Rails configuration (e.g. config/environments/production.rb)
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'

Thanks.

Ari

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list