I'd like all my images (jpg|gif|png) which currently being serversd from mydomain.com/files/ to be servered from a second machine which I've set up to server files from static.mydomain.com.
I am wondering how should I define nginx rewrite rule to do so?
Thanks
Best Answer
You can use proxy pass: http://wiki.nginx.org/HttpProxyModule#proxy_pass
In your case this could be something like: