7

nginx 一个 location 能实现三个 proxy_pass 吗

 2 years ago
source link: https://www.v2ex.com/t/787101
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  NGINX

nginx 一个 location 能实现三个 proxy_pass 吗

  liuzh336 · 1 小时 21 分钟前 · 338 次点击
新手,我想在 nginx 配置上实现一种情况:一个 location 能实现三个 proxy_pass,匹配到第一个就转发第一个,不行就匹配第二个。。。
但是能搜到的实现方式 https://blog.csdn.net/liuxiao723846/article/details/83147792
要么是根据路径的字符串拼接来 if else,要么就是根据 url 后面的参数来区分=_=。但是参数和 url 这两种方式,以目前的场景暂时实现不了。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK