# Advanced: improving downloads

If you have access to edit your Apache or NGINX sites and configurations, it's recommended that you enable XSendFile (or X-Accel) so the files are served directly, eliminating php as a middle-man, which can be the cause of slow, interrupted downloads, or corrupted files (specially when downloading very large files).

After enabling the module, make sure to also enable the corresponding option in `Options -> General`.

If you are using NGINX, ProjectSend will give you the code that you need to add to your server block.

<figure><img src="https://3697781441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBF6v9cdMNQPuJO3qenrZ%2Fuploads%2FpHvdWW3H2NCxcLcThims%2Fdownload-method.png?alt=media&#x26;token=9a5fec77-8299-42dc-ba03-eaa4a39802a9" alt=""><figcaption><p>Example: X-Accel download method selected for nginx</p></figcaption></figure>

A few resources on how to get started if you are not familiar with X-Accel or XSendFile:

* [mod\_xsendfile for Apache2/Apache2.2](https://tn123.org/mod_xsendfile/)
* [XSendfile on NGINX wiki](https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/)
