Welcome! Log In Create A New Profile

Advanced

Re: Check for existing remote files

Reinis Rozitis
January 13, 2011 05:56AM
> how can i check http://www.google.com/logo.png or
> http://dl.dropbox.com/u/3720261/testdir/file.zip

Well it depends what yout want to do after checking if the file does or
doesnt exist.

If you just want to serve the remote file and fall back to some backup
location/host you can technically use proxy_pass (define 2 or more upstream
( http://wiki.nginx.org/HttpUpstreamModule ) servers which to check first
(your own you can define as 'backup')) with proxy_next_upstream http_404;
option ( http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream ).

For something more sophiscated scenario you would need to write either perl
module or just rewrite the requests to a php script for example.

rr


_______________________________________________
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: 112
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