Hi all,
I am using nginx's Proxy module to retrieve images from Amazon S3. I need to be able to tell the Proxy module to retrieve a smaller sized file if a bigger sized file doesnt exist. How can I do that?
For instance, my nginx configuration:
location / {
proxy_pass https://s3.amazonaws.com/my_bucket/;
error_page 415 = /empty;
}
Say I have image1_100.jpg on S3 then http://localhost/image1_100.jpg works fine. However http://localhost/image1_300.jpg wont work. I want to be able to ask nginx to request the https://s3.amazonaws.com/my_bucket/image1_300.jpg file and if it doesnt exist, request for iamge1_100.jpg file instead.
Thanks!