A
A
AlexPal4inskiy2015-04-15 13:28:08
PHP
AlexPal4inskiy, 2015-04-15 13:28:08

The script gives files through X-Accel-Redirect. This is happening very slowly. Waiting from 1 to 15 seconds. How to solve this problem?

The request to the server comes in the form domain.com/files/image.png
Part of the script for processing:
header("Content-Type: application/x-force-download");
header('X-Accel-Redirect: /files/id_'.$this->id.'/'.$file);
where $file - files/image.png
This results in a wait of up to 15 seconds. And if there are 30-40 files on the site, then the site loads very slowly.
How to solve this problem?
Apache + Nginx web server.
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question