title: Django: Serving server files with Apache and mod_xsendfile
body: <p>I am having trouble serving my server files for User download. I am using Apache with mod_xsendfile. Firstly, if I try to download the file on the development server the file is of 0 bytes. Secondly, if I try to serve the file using Apache I get the error </p>
  
  <p>SuspiciousOperation: Attempted access to ***** denied on the line document.file.path</p>
  
  <pre><code>file_name = document.file.name          
  response = HttpResponse(mimetype='application/force-download')
  response['Content-Disposition'] = 'attachment; filename=%s' % smart_str(file_name)
  response['X-Sendfile'] = document.file.path
  return response
  </code></pre>
  
  <p>I have configured mod_xsend with "Xsend On". Appreciate the help</p>