This directive assigns a path to be used for the indicated location.
Note
that it may look similar to the root directive, but the document root
doesn’t change, just the file system path used for the request.
For example:
location /i/ {
alias /spool/w3/images/;
}
The request “/i/top.gif” will return the file
“/spool/w3/images/top.gif”.
It is possible to use variables in the replacement path.
The alias directive cannot be used inside a regex-specified location. If
you
need to do this you must use a combination of rewrite and root.