e123e123e123 Wrote:
-------------------------------------------------------
> another question ,
>
> using 'alias' or 'root' is bestter ? or all is
> same ?
location /myalias {
root /path/to;
}
the directory name in filesystem must be same as the one specified in location (in this case /path/to/myalias)
you can't make it work if you want location /anotheralias mapped to /path/to/myalias (must be /path/to/anotheralias) but you can do
location /anotheralias {
alias /path/to/myalias;
}
But you must be careful when dealing with alias. Especially if you want to combine alias with try_files