Answer the question
In order to leave comments, you need to log in
How to pass a parameter through proxy_pass?
Hello. There are two sites. I want to display the contents of site2.com in the site1.com/admin directory.
But at the same time, on site2.com , I must understand that it was opened through site1, or was opened directly through site2.
in the nginx config, I made a proxy_pass for the /admin/ directive, but I don’t know how to pass at least some parameters.
Google suggests options set $args branding=1&$args; proxy_pass http://site1.pixliapp.com$args;
But all of them either do not work, i.e. there is nothing in $_SERVER, or they give HTTP500. Please tell me what am I doing wrong?
Answer the question
In order to leave comments, you need to log in
location /admin/ {
rewrite (.*) $1?branding=1 break;
proxy_pass http://site2.com;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question