Welcome! Log In Create A New Profile

Advanced

Re: Dropbox as upsream server

April 11, 2013 11:08AM
Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
>
> On Thu, Apr 11, 2013 at 04:15:02AM -0400, winniethepooh wrote:
>
> It's not clear why you added "x.x.x.x" to the upstream block if
> it's not an upstream but the same server. Obvious solution would
> be to remove it.
>
> If you try to implement "check the local disk, and if the file
> isn't there - proxy to dropbox" logic, correct solution would be
> to use something similar to an example provided at
> http://nginx.org/r/error_page:
>
> location / {
> error_page 404 = @fallback;
> }
>
> location @fallback {
> proxy_pass http://backend;
> }
>
> --
> Maxim Dounin
> http://nginx.org/en/donation.html

Hey, thanks for your reply! I have the same files stored both at /path/to/my/root/* and at http://dl.dropbox.com/u/#########/*. The same folder structure and everything.

What I want is to "load balance" between dropbox and the same nginx site (x.x.x.x) so both places can serve files.

Is the only way to do this to split up the proxy as one server block on one port (80 for example) and the actual server block hosting the files in another server block on a different server port (8080 for example)?

Or can I modify the originally posted setup to do what I want?

Thanks again.
SubjectAuthorPosted

Dropbox as upsream server

winniethepoohApril 11, 2013 04:15AM

Re: Dropbox as upsream server

Maxim DouninApril 11, 2013 07:06AM

Re: Dropbox as upsream server

winniethepoohApril 11, 2013 11:08AM

Re: Dropbox as upsream server

Maxim DouninApril 11, 2013 11:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 82
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