Score:0

Need some pointer on the approach for proxying the request based on complete request URL in Nginx for 1000 of APIs

jp flag

I have 2 applications(One Being Simulator and the other one is real application) running with the same root context and trying to use Nginx as a proxy to these 2 applications. I have around 1000 APIs being served from Simulator while the others should go to the Real application server.

Could someone please let me know a good approach for writing this routing logic for Simulator APIs as how to configure those 1000 APIs as i do not have any regex pattern to identify those APIs?

Ivan Shatsky avatar
gr flag
You can try to get required application from the request URI using [`map`](http://nginx.org/en/docs/http/ngx_http_map_module.html) block, something like `map $uri $app { ... }`
Anil Kumar avatar
jp flag
Thank you @IvanShatsky, it helped
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.