X-Accel-Redirect and Range headers work out of the box.

244 views
Skip to first unread message

Jason Garber

unread,
Jul 11, 2013, 7:38:05 PM7/11/13
to mod...@googlegroups.com
Hello All,

We are using nginx in front of apache+mod_wsgi.  Authenticated file uploads are stored on the filesystem in a FileStruct directory structure

Requests for these files go through a URI like /serve/video/1234

mod_wsgi handles the request, the python application authenticates it (via session cookie), and returns an X-Accel-Redirect header to nginx, which serves the file directly.

We hooked up a video player for the first time today with large (GB) video files.  To my delight, I found that nginx seamlessly handled the Range headers and allowed the user to jump around the video.

I thought I would post this for anyone who wasn't aware or wasn't sure that this would work out of the box.

For reference, FileStruct is a python module we authored that makes it easy to receive, store, manage, and serve a large number of file uploads.  https://github.com/appcove/FileStruct

Thanks!
Jason

  
Reply all
Reply to author
Forward
0 new messages