【发布时间】:2017-05-10 16:58:16
【问题描述】:
我被困在这两者之间:
location / {
#proxy pass to some other location that handles all urls except /index
}
location /index {
#logic to handle the index
}
目前当我第一次运行 nginx 时
位置/ 块被执行,我被重定向到其他机器和
位置/索引 没有被调用。有没有办法区分这两者,或者我必须专门写所有位置。
【问题讨论】:
-
location
/index只会在你发出example.com/index之类的请求时执行,否则/location 将被执行
标签: nginx proxy http-proxy nginx-location