Welcome! Log In Create A New Profile

Advanced

Re: Rails XSendfile via Nginx

Francis Daly
May 09, 2012 07:26AM
On Wed, May 09, 2012 at 04:58:55AM +0200, Ari King wrote:
> Jonathan Matthews wrote in post #1059929:

Hi there,

> Prior to asking my original question, I checked my error.log and found
> no errors whatsoever. I also tried using curl, but the content returned
> is a Nginx 404 error page. Any other ideas? I also doubled checked my
> alias configuration; as per nginx docs, location & alias take regex
> expressions and captures. My hunch is that the url is the problem
> (/recipes/1/video) since it does NOT contain the filename.

your config has two location{} blocks:

location /
location /recipes/(.*)/video

Probably you want to include "~" in your second location directive:
http://nginx.org/r/location

That might be sufficient to get everything working for you.

It's not clear to me exactly how you wish things to work. If the above
change gets things working, then it doesn't matter that it's not clear
to me. But:

the usual way to use X-Accel-Redirect is that the client accesses
"/public/uri" which nginx sends to an upstream for processing; that
upstream returns X-Accel-Redirect to "/private/uri"; and nginx is
configured to serve "/private/uri" from the filesystem.

So: if the client wishes to get access to the file "test.video", what
public url will they use to access it? What is the X-Accel-Redirect
header that the backend sends to nginx? And where on the filesystem is
the file "test.video"? If you can answer those questions, then it may
become clear how nginx should be configured to allow it all to happen.

f
--
Francis Daly francis@daoine.org

_______________________________________________
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: 333
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