Nginx-映射本地文件
2016-12-11 本文已影响709人
33d31a1032df
1. root指令
location /test {
root d:/www;
index index.html;
}
http://localhost/test/index.html 将会映射到 d:/www/test/index.html
2. alias指令
location /test {
alias d:/www;
index index.html;
}
http://localhost/test/index.html 将会映射到 d:/www/index.html
完整示例:GitHub
PS:本文使用的是nginx-1.10.2