Score:0

Route different base path to same proxy pass Nginx

cn flag

I want to pass different path to the same proxy_pass but I keep getting 502 Bad gateway.

These path use the same port number but different base path. How do I make it work from what I have which returns an error currently.

this is what my current location looks like

worker_processes 4;
# worker_process auto
events { worker_connections 1024; }

http {

    server {

        listen 80;
        charset utf-8;

        location ~ ^/api/v1/(wallet|card)/(.*)$ {
            proxy_pass http://wallet-service:3007/api/v1/$1/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'Upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }
}
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.