I want convert url like http://mysite.com/private/user1/file1.dat
to destination file as /host/userfiles/user1/private/file1.dat
I try this:
location ~/private/(.*)[/]?(.*)$ {
root /host/userfiles/$1/private;
try_files $2 @files_private_failed;
}
This example fallback to @files_private_failed.
Debugging shows that regexp vals $1 = "user1", $2="file1.dat". So, they are correct
The file /host/userfiles/user1/private/file1.dat also exists, with correct perms.
What is wrong with config?
to destination file as /host/userfiles/user1/private/file1.dat
I try this:
location ~/private/(.*)[/]?(.*)$ {
root /host/userfiles/$1/private;
try_files $2 @files_private_failed;
}
This example fallback to @files_private_failed.
Debugging shows that regexp vals $1 = "user1", $2="file1.dat". So, they are correct
The file /host/userfiles/user1/private/file1.dat also exists, with correct perms.
What is wrong with config?