Welcome! Log In Create A New Profile

Advanced

Re: Rails XSendfile via Nginx

Ari King
May 09, 2012 06:18PM
> Appreciate the help.
>
> -Ari

**I also tried hard-coded values, but that still results in a 404
error.**

upstream xxx.xxx.xxx.xxx {
server 127.0.0.1:3000;
server 127.0.0.1:3001;
server 127.0.0.1:3002;
}

location ~ /lessons/1/video/(.*) {
internal;
alias /var/www/app/current/uploads/videos/1/original/$1;
}

location / {
proxy_redirect off;

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;

proxy_set_header X-Sendfile-Type X-Accel-Redirect;
proxy_set_header X-Accel-Mapping
/lessons/1/video/=/var/www/app/current/uploads/videos/1/original/;

proxy_connect_timeout 75;
proxy_send_timeout 60;
proxy_read_timeout 60;
root /var/www/app/current/public;

if (!-f $request_filename) {
rewrite ^(.*)$ $1 break;
proxy_pass http://xxx.xxx.xxx.xxx;
break;
}
}

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

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