# 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="/files/1w1dVN8PbwEp6jSnmCDj" 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/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.projectsend.org/about/installation/advanced-improving-downloads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
