Welcome! Log In Create A New Profile

Advanced

Re: Rails XSendfile via Nginx

Jonathan Matthews
May 07, 2012 07:22PM
On 8 May 2012 00:16, Jonathan Matthews <contact@jpluscplusm.com> wrote:
> On 7 May 2012 23:53, Ari King <lists@ruby-forum.com> wrote:
>> 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'
>
> Steps you could take / info you could provide:
>
> * hit the app direct with a curl invocation and examine the headers it
> creates. I bet you'll find the problem here.
> * re-read the alias docs. Your location{/recipe/...} looks a bit
> screwy, if the examples you've given are precise.

I forget step #0: examine the error log! It'll tell you where nginx is
failing to find your file, hence what the config problem might be ...

J
--
Jonathan Matthews
Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rails XSendfile via Nginx

Ari King May 07, 2012 06:54PM

Re: Rails XSendfile via Nginx

Jonathan Matthews May 07, 2012 07:18PM

Re: Rails XSendfile via Nginx

Jonathan Matthews May 07, 2012 07:22PM

Re: Rails XSendfile via Nginx

Ari King May 08, 2012 11:00PM

Re: Rails XSendfile via Nginx

Jonathan Matthews May 09, 2012 06:22AM

Re: Rails XSendfile via Nginx

Francis Daly May 09, 2012 07:26AM

Re: Rails XSendfile via Nginx

Ari King May 09, 2012 05:22PM

Re: Rails XSendfile via Nginx

Ari King May 09, 2012 06:18PM

Re: Rails XSendfile via Nginx

Francis Daly May 09, 2012 06:42PM

Re: Rails XSendfile via Nginx

Francis Daly May 09, 2012 06:40PM

Re: Rails XSendfile via Nginx

Ari King May 10, 2012 04:48PM

Re: Rails XSendfile via Nginx

Francis Daly May 10, 2012 08:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 308
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready