D
D
Dmitry2017-08-04 02:23:19
Nginx
Dmitry, 2017-08-04 02:23:19

Is it possible to configure NGINX to serve static according to sessions in Apache?

There is a standard configuration:
NGINX, which gives the static, followed by Apache + PHP, which processes requests.
(statics are not only regular js/css/png, but also multi-megabyte archives).
I would like to be able to give access to files on NGINX in accordance with sessions in Apache.
For example, setting up session storage in general memcached and writing logic for NGINX in lua?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2017-08-04
@gromdron

As I understand it, the task is as follows: depending on the user's access, let him download the file. Those. if there is access, he can download the file, if not, he cannot, and if the rights are taken away, then he can no longer download the file.
Try - X-Accel

This allows you to handle authentication, logging or whatever else you please in your backend and then have NGINX handle serving the contents from redirected location to the end user, thus freeing up the backend to handle other requests. This feature is commonly known as X-Sendfile.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question