linux的映射参考:http://www.cnblogs.com/freeweb/p/5446632.html
windows下映射如下:
location /resource/ {
root /;
rewrite ^/resource/(.*)$ \$1 break;
}
其中nginx安装路劲为:
D:\DevelopTools\nginx-1.12.0\
例如:
请求:http://localhost/resource/1.txt
则1.txt位置应为D:\1.txt
日志:
127.0.0.1 - - [12/Jul/2017:18:03:46 +0800] "GET /resource/1.txt HTTP/1.1" 200 3 "-" "Mozilla/5.0 (Windows NT 10.0; 。。。"