Welcome! Log In Create A New Profile

Advanced

Re: Check for existing remote files

Mikhail Mazursky
January 13, 2011 06:52AM
2011/1/13 mignev <nginx-forum@nginx.us>:
> First thanks for the critique. Such types of solutions are many, but I
> don't want such solution. In my case i have over a million images of
> which i don't know the name or their existence. I want to try for
> existence of requested file and if he is found then return to me. If the
> requested file is not exist go to my proxy_pass $mybackend; and  he will
> generate and upload it. WIth this idea i want to skip database layer. I
> have some ideas how i can do that but firstly i want to hear your
> feedback about that.

server {
....

location ~ ^/remote/(?<remote_url>.+)$ {
proxy_intercept_errors on;
error_page 404 = @mybackend;
proxy_pass http://$remote_url;
}

location @mybackend {
proxy_pass http://mybackend_upstream;
}
}

This shows the general idea about how to do this, but i haven't tested
so there may be syntax errors.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Check for existing remote files

mignev January 13, 2011 03:40AM

Re: Check for existing remote files

vt January 13, 2011 04:20AM

Re: Check for existing remote files

mignev January 13, 2011 04:59AM

Re: Check for existing remote files

Mikhail Mazursky January 13, 2011 06:52AM

Re: Check for existing remote files

Reinis Rozitis January 13, 2011 05:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 129
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready