alias
is used to replace the location part path (LPP) in the request path, while the root
is used to be prepended to the request path.
They are two ways to map the request path to the final file path.
alias
could only be used in location block, and it will override the outside root
.
alias
and root
cannot be used in location block together.