Given a location like this:
location ~ ^/user-content/img/) {
root /srv/foo/bar/uploads/;
autoindex off;
access_log off;
expires 30d;
}
Is it possible using nginx to have a request for
/user-content/img/3AF1D3A69CE92ADAED8B0D25C2411595C7C798A5.png
To be actually served from directory /srv/foo/bar/uploads/3A/F1/D3
which would involve taking the first two characters from the request filename and use them as first subfolder, then using characters 3-4 for the next deeper folder and finally append characters 5-6 for the last subfolder?