I'm trying to use proxy_pass with nginx to mask redirects to my image CDN. I'd like to be able to go to a path like:
myserver.com/images/12345/whatever-name-goes-here.jpg
I'd like that to proxy to
i've tried the following
location ~ /images/(.*)/(.*) {
proxy_pass http://imagecdn.com/$1.jpg;
}
But i keep getting 502 errors. Any idea if this is even possible ?