I serve statistic files by
location /files/ {
alias /folder1/;
}
Now I want to distribute the files in two disks. The uri
has a format of /files/[0-9]/subfolders/file.ext
. How can I configure nginx to read files from /files/[0-4]/...
from Disk1, and files/[5-9]/...
from Disk2. Note that autoindex
is not enabled.
Perhaps you can achieve this through regex matching. Add the following regexes:
Hope this works!