djangosnippets.org: Latest snippets posted by h0axifyhttps://djangosnippets.org/users/h0axify/2012-03-31T09:56:32.247259-05:00h0axifyApache X-sendfile with permissions checking
2012-03-31T09:56:32.247259-05:00h0axifyhttps://djangosnippets.org/snippets/2728/<p>This allows the mod_xsendfile module for Apache safely serving private files. Django take cake about processing and permissions checking, Apache server requested files.</p>
<p>Installation of mod_xsendfile:</p>
<p>$ tar -xzvf mod_xsendfile-0.12.tar.gz
$ /usr/sbin/apxs -c mod_xsendfile-0.12/mod_xsendfile.c
$ ld -Bshareable -o mod_xsendfile-0.12/mod_xsendfile.so mod_xsendfile-0.12/mod_xsendfile.o</p>
<p>Copy mod_xsendfile.so to your local Apache modules folder.
Modify httpd.conf …</p>
Freely redistributable