Re: serving a static file via nginx requiring authentication from django

2009-07-01 Thread Annie
See, I knew it was probably something simple that I'd missed because I'd been looking at this for too long. *g* I changed the PROTECTED_DIR to '/media/books/' to match what I had in my nginx.conf and changed the response['X-Accel-Redirect'] to filename in views.py and it works perfectly now. (I

Re: serving a static file via nginx requiring authentication from django

2009-07-01 Thread Alvin
I'll be writing a blog post about this soon when John wrote is right on though it took me a while to wrap my mind around it the nginx location + nginx alias + url passed = file to be served so to get file /home/me/web/example.com/download/file.pdf location ^~ /download {

Re: serving a static file via nginx requiring authentication from django

2009-07-01 Thread Skylar Saveland
You could document this experience once you get it running; sounds useful. On Jun 30, 1:00 am, John Hensley wrote: > On 6/28/09 10:20 PM, Annie wrote: > > > I'm trying to this to work: users can download their files from their > > account page from a url like > >

Re: serving a static file via nginx requiring authentication from django

2009-06-29 Thread John Hensley
On 6/28/09 10:20 PM, Annie wrote: > I'm trying to this to work: users can download their files from their > account page from a url like this: > http://example.com/account/download/a1234565789asedga-2/ > for which django processes the authentication and then passes along > the info to nginx to

serving a static file via nginx requiring authentication from django

2009-06-28 Thread Annie
I'm trying to this to work: users can download their files from their account page from a url like this: http://example.com/account/download/a1234565789asedga-2/ for which django processes the authentication and then passes along the info to nginx to serve the file. However, I keep getting