Nginx负载路径

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
location /boot {
root D:\develop\boot\front;
index index.html index.htm;
}
location /boot2 {
root D:\develop\boot\front/;
index index.html index.htm;
}
location /boot3/ { # 推荐
root D:\develop\boot\front/;
index index.html index.htm;
}
location /boot4/ {
root D:\develop\boot\front;
index index.html index.htm;
}
1
2
3
4
5
6
7
8
http://192.168.3.4/boot   ->   http://192.168.3.4/boot/
D:\develop\boot\front/boot/index.html
http://192.168.3.4/boot2 -> http://192.168.3.4/boot2/
D:\develop\boot\front/boot2/index.html
http://192.168.3.4/boot3/ -> http://192.168.3.4/boot3/
D:\develop\boot\front/boot3/index.html
http://192.168.3.4/boot4 -> http://192.168.3.4/boot4/
D:\develop\boot\front/boot4/index.html

1
2
3
4
location / {
root D:\develop\boot\front;
index index.html index.htm;
}
1
2
http://192.168.3.4
D:\develop\boot\front/

本文地址: https://github.com/maxzhao-it/blog/post/ec5ec98b/