Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question