Skip to content

michaelklishin/nginx-x-accel-redirect-example-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This example shows how you can use X-Accel-Redirect header to make
Nginx stream files for you. Merb core has special method for it:
Merb::Controller#nginx_send_file, but it's a bit tricky to
figure out what internal redirect URI use for what file location.

See config/nginx_config_sample with a couple of comments, Files
controller for code and public/files directory content to see
how Nginx concatenates internal redirect path with root.
And don't forget to add x-accel-redirect.local to your /etc/hosts.

Hopy this saves you some time.

About

Nginx X-Accel-Redirect example running on Merb core.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published