What does this module do?

The Xsendfile module enables fast transfer for private files in Drupal using the Xsendfile webserver module (Apache) or X-Accel-Redirect (Nginx). It does this by letting the webserver handle the private file transfer, instead of letting Drupal send the file response.

Currently file downloads and image derivative downloads (created by image styles) are supported (8.x-1.x).

Installation

  1. Install the module as usual.
  2. Enable private files. For information on how to do so, see https://www.drupal.org/docs/8/core/modules/file/overview#s-private-file-...
  3. Go to /admin/config/media/file-system/xsendfile and enable either "Files transferred by Nginx using X-Accel-Redirect" or "Files transferred by Apache using xsendfile", depending on your webserver type.
  4. For Nginx: Copy/paste the suggested config (see README.txt), and reload Nginx.
    Please note: The Nginx configuration is untested. If you use this module with Nginx, please report your findings. Thanks!
  5. For Apache: install the xsendfile Apache module (https://tn123.org/mod_xsendfile/), copy/paste the suggested config (see README.txt), and reload Apache.

Project information

  • caution Seeking co-maintainer(s)
    Maintainers are looking for help reviewing issues.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Module categories: Performance
  • chart icon74 sites report using this module
  • Created by marcoka on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases