Score:0

reverse proxy nginx not working with dynamic parameter

ae flag
Joe

I use nginx reverse-proxy

When I use this code it works

location / {
        proxy_pass https://test.serverA.com;       
        proxy_redirect off;

    }

But when I use this code it doesn't work

set $sub test;
location / {
        proxy_pass https://$sub.serverA.com;       
        proxy_redirect off;

    }

Does anyone know the reason?

Richard Smith avatar
jp flag
Use `nginx -T` to test the configuration file. Check the error log for details of the problem and describe what doesn't work. If you use a variable with `proxy_pass` you will need to define a `resolver`. See [`proxy_pass` manual page](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass).
I sit in a Tesla and translated this thread with Ai:

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.