M
M
Meridian3122013-12-08 13:31:48
PHP
Meridian312, 2013-12-08 13:31:48

How to redirect an authorized user to your home directory?

I also rummaged through Habré, habrahabr.ru/post/26401 and habrahabr.ru/post/30149/, also the article blog.sbf5.com/?p=6 did not explain the whole mechanism much, I would like not to use the domain.
It is necessary to make it so that the authorized user user, upon passing authorization, is transferred to example.com/home, and the actual home directory is located in another place like Z:/user/.
I don't really know how to do this and have already done quite a bit of research online... need help explaining how to do this with nginx. The same for any other users, to their respective home directory. It would be desirable to achieve dynamic redirect'a for any user. The user must be authorized and only he has access to his directory ..
I will be very grateful for a voluminous answer!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ksand, 2013-12-08
@ksand

the problem looks contrived:
location ^ /([^/]*)/ {
auth_basic "Closed area"
auth_basic_user_file "path/to/passwd"
alias Z:/$1
proxy_pass 127.0.0.1
}
In this case, the alias directive is important, in which you can operate variables set using regular expressions in the location. In this case, the location remembers the beginning of the uri before the first slash.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question