Welcome! Log In Create A New Profile

Advanced

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

October 03, 2012 05:00PM
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!
SubjectAuthorPosted

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

wurb32October 03, 2012 05:00PM

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

Maxim DouninOctober 04, 2012 05:46AM

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

wurb32October 04, 2012 12:08PM

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

Maxim DouninOctober 05, 2012 08:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready