LoadModule xsendfile_module /usr/lib/apache2/modules/mod_xsendfile.so XSendFile On XSendFilePath ${HOME}/data/ XSendFilePath ${HOME}/static/ # The presence of an Apache output filter (mod_xsendfile) causes mod_wsgi # to internally convert HEAD requests to GET before passing them to the # application, for reasons explained here: # . # However, we need HEAD requests passed through as-is, because the TUS # protocol requires them. It should be safe to disable this functionality in # our case, because mod_xsendfile does not examine the response body (it # either passes it through or discards it entirely based on the headers), # so it shouldn't matter whether the application omits the body in response # to a HEAD request. WSGIMapHEADToGET Off