Score:0

Rewriting URL in mirror location context in Nginx

mp flag

In Nginx I have been trying to mirror traffic from one web server to another as follows

 http://localhost:8008/var1/var2/  ->  http://localhost:8009/var3/var4/

this is my nginx mirror configuration.

location /var1/var2/ {
    mirror /;
    mirror_request_body on;
    proxy_pass http://localhost:8008;
}


location = / {
    internal;
    set $upstream_endpoint http://localhost:8009;
    rewrite ^/var1/var2/(.*)$ /var2/var3/$1 break;
    proxy_pass $upstream_endpoint$request_uri;
}

I am not receiving request on mirrored server.

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.