Re: configuring a proxy fallback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 17 May 2018, at 18:44, John Bazik <john_bazik@xxxxxxxxx> wrote:
> 
> 
>> Would you be able to share the nginx config to achieve what you're
>> looking for, as a reference point?
> 
> Sure.  Condensing it, the basic idea is this;
> 
>        location / {
>                uwsgi_pass cms;
>                include uwsgi_params;
>                uwsgi_intercept_errors on;
>                error_page 404 = @fallback;
>        }
>        location @fallback {
>                try_files $uri @static;
>        }
>        location @static {
>                proxy_pass              http://static/$request_uri;
>        }

Gotcha.  Interesting that that works: it kind-of implies the possibility
of recursive error documents.

I wonder if, as a workaround, you might use an errordocument that
converts 404 to 301 or 302, and redirects to $static/$request_uri?

(apologies if this is the beer speaking: just back from an evening out).

-- 
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux