If I write the config like this:
location: /a {
root /home/files/b/
}
and I request http://example.com/a/1.jpg, Nginx would consider that I am requesting /home/files/b/a/1.jpg, but I want Nginx to get /home/files/b/1.jpg instead.
How to resolve this issue?
P.S. Consider that the paths /a, /b, and their structure of sub folders are unchangeable.
use alias instead of root (http://wiki.nginx.org/HttpCoreModule#alias)