How to tell Proxy module to retrieve secondary URL if primary URL doenst exist
wurb32
nginx-forum at nginx.us
Wed Oct 3 21:00:39 UTC 2012
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!
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,231364,231364#msg-231364
More information about the nginx
mailing list