2018-01-18 06:07:20 +00:00
|
|
|
Howto configure mod_xsendfile
|
|
|
|
==============================
|
|
|
|
|
|
|
|
Downloading large files from SeedDMS can be slow, because they are delivered
|
|
|
|
by the PHP download script. This is a common problem not specific to SeedDMS
|
|
|
|
but to PHP scripts of this kind in general. Granting direct access on the
|
|
|
|
download file is not a option as it circumvents the access restrictions of
|
|
|
|
SeedDMS.
|
|
|
|
|
|
|
|
The Apache module xsendfile is just for this kind of controlled downloads. If
|
|
|
|
is installed and configured, SeedDMS will hand over the download to the web
|
|
|
|
server which does a much better job than the PHP script. In order to make it
|
|
|
|
work, mod_xsendfile must be installed, turned on and the path to the download
|
|
|
|
files must be set to the directory containing the document files. If your document
|
2018-01-18 07:48:12 +00:00
|
|
|
root is /var/www and you extracted the quickstart archive into that directory,
|
2018-01-18 06:07:20 +00:00
|
|
|
then the document content directory will be at
|
2018-01-18 07:48:12 +00:00
|
|
|
/var/www/seeddms51x/data/ . Add the following to your apache configuration,
|
2018-01-18 06:07:20 +00:00
|
|
|
either globally or within a virtual host configuration. Setting the path in
|
|
|
|
an .htaccess file will not work.
|
|
|
|
|
|
|
|
XSendFile on
|
2018-01-18 07:48:12 +00:00
|
|
|
XSendFilePath /var/www/seeddms51x/data/
|
2018-01-18 06:07:20 +00:00
|
|
|
|
|
|
|
If the XSendFilePath is not set propperly, you will notice an error message
|
|
|
|
in your apache log file, probably telling you that the download file could not
|
|
|
|
be found.
|
2020-12-22 16:04:39 +00:00
|
|
|
|
|
|
|
A positive side effect of xsendfile is support for content ranges which are
|
|
|
|
currently *not* supported by seeddms' Download and ViewOnline scripts. This is
|
|
|
|
especially usefull when previewing videos. Without content ranges it is not
|
|
|
|
possible to jump to certain time in the video.
|
|
|
|
|
|
|
|
In order to check if the xsendfile module is loaded, php uses apache_get_modules()
|
|
|
|
which is only available if php is loaded as an apache module. Running php in fpm
|
|
|
|
mode will prevent php from checking for xsendfile and consequently xsendfile support
|
|
|
|
will not be available.
|