Nginx If /something.php is called act as http://www.stgelse.com/xyz is opened
I want to open IP/something.php and to see everything as if i opened http://anotherserver.com/path
And without redirections, preserving URL1 and pass all GET params to URL2
URL1: "http://182.6.15.191/something.php"
URL2: "http://www.example.com/another"
I tried something like this, but nginx proxy mod is quite huge to understand
location /something.php {
proxy_pass http://somethingelse.com/else;
proxy_set_header Host $host;
}
But this redirects URL and seems like doesn't pass GET params
p.s. in apache it was all possible just with mod_proxy and two lines
ProxyPass /filename.php http://someurl.com/something
ProxyPassReverse /filename.php http://someurl.com/something
Use the following line
matching it with your details.