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