Reputation: 43
I want to make nginx proxy according to url parameters
url example: www.foo.com/proxy/$serverUrl/$picUrl
$serverUrl example: storage.example.com $picUrl example: test.jpg or test.png
proxy to: https://$serverUrl/static/$picUrl
how to make nginx proxy like that?
Upvotes: 1
Views: 160
Reputation: 133
location ~ /proxy/(.*)/(.*)$ {
proxy_pass https://$1/static/$2;
}
try it, hope it would be helpful
Upvotes: 1