Configure Nginx with proxy_pass

前端 未结 2 390
隐瞒了意图╮
隐瞒了意图╮ 2020-12-08 03:10

I\'m trying to configure Nginx to proxy stuff on a subdomain: dev.int.com

I want dev.int.com to be proxied to IP:8080, and dev.int.com/stash to be proxied to IP:7990

2条回答
  •  不思量自难忘°
    2020-12-08 03:58

    Nginx prefers prefix-based location matches (not involving regular expression), that's why in your code block, /stash redirects are going to /.

    The algorithm used by Nginx to select which location to use is described thoroughly here: https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms#matching-location-blocks

提交回复
热议问题