I have a symfony 1.4 application with an admin backend, and I would like to make some pdf / images available to authenticated users only. The authentication process is handled by symfony.
How can I make sure only authenticated users can download the files, even files exceeding php’s memory_limit setting?
The web server I use is nginx.
Use
X-Sendfile(/X-Accel-Redirect), nginx will serve the file after the PHP script sends the appropriate headers and ends. This seems a proper explanation.greg0ire > Here is my implementation with symfony 1.4 and nginx:
Nginx configuration:
Symfony routing
Symfony action