location /xixi {
alias /Users/qingshan/folder1;
index index.html;
}
访问localhost/xixi的时候,就会访问/Users/qingshan/folder1下的index.html
location /123/abc/ {
alias /ABC;
}
当请求http://qingshan.com/123/abc/logo.png时,会返回 /ABC/logo.png文件,即用/ABC替换 /123/abc。
原文http://www.bubuko.com/infodetail-3538390.html