How to tell Proxy module to retrieve secondary URL if primary URL doenst exist

wurb32 nginx-forum at
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 / {
            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 file and if it doesnt
exist, request for iamge1_100.jpg file instead.


Posted at Nginx Forum:,231364,231364#msg-231364

More information about the nginx mailing list