Hello. Tell me how to solve the problem. There is a server nginx + webdav, there is a folder on the server / var / data / user1, / var / data / user2, etc. Such a task when connecting via webdav, the user specifies the login and password, it is necessary that each user gets into his folder. I plan to authorize via http_auth_request. How to configure nginx config correctly?

    1 answer 1

    For general reasons: to somehow make the user's name fall into a variable (I think auth_request_set can help with this), substitute this variable in a root directive or alias

    • It is possible to do this: send an authorization request, in response, the arrival of the name of the user’s folder, and substitute it in root / var / data / $ user_dir? - Vadym
    • Something I had in mind. Only I did not mean the name of the directory, but the name of the user (assuming that they are identical, or that one can easily be made from one). But as far as I understand http_auth_request allows nginx to return arbitrary values ​​(via the response headers), so no difference - MrClon