[users@httpd] configuring a proxy fallback

2018-05-17 Thread John Bazik
Here's something I think I can't do with apache. I have a uwsgi backend server and a legacy http server. I would like a reverse proxy that puts the dynamic site "in front of" the legacy site, such that 404s from the former are internally redirected to the latter. We have this implemented in ngin

Re: [users@httpd] configuring a proxy fallback

2018-05-17 Thread John Bazik
> FallBackResource may be one option. Another might be the "lookahead" > feature in mod_rewrite. Another is to poke and prod with -d/-f tests > in mod_rewrite if you can determine that way. All of those respond to a missing file, not a 404 returned from a proxied request. That's where I keep hitt

Re: [users@httpd] configuring a proxy fallback

2018-05-17 Thread John Bazik
> Oh I see, I didn't realize legacy was also proxied. Maybe > ProxyErrorOverride helps with one of the options? That lets me use ErrorDocument on the proxy, but it doesn't let me redirect the original request to the legacy site. John -

Re: [users@httpd] configuring a proxy fallback

2018-05-17 Thread John Bazik
> A bit of an ugly hack (and probably not useful), but what about an > errordocument that uses SSI to include your contents? Mmm. I don't want to go there. > 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 i

Re: [users@httpd] configuring a proxy fallback

2018-05-18 Thread John Bazik
> I wonder if, as a workaround, you might use an errordocument that > converts 404 to 301 or 302, and redirects to $static/$request_uri? Even if that works, it has to be an internal redirect. John - To unsubscribe, e-mail: users

Re: [users@httpd] configuring a proxy fallback

2018-05-18 Thread John Bazik
> Doesn't ErrorDocument to a proxied path work? Something like: > > ProxyErrorOverride on > ErrorDocument 404 /internal_404/ > ProxyPass /internal_404/ http://legacy_site/whatever/ > ProxyPassReverse /internal_404/ http://legacy_site/whatever/ Wow, thanks! I assumed that "local url" in the docs

Re: [users@httpd] configuring a proxy fallback

2018-05-21 Thread John Bazik
> OK, was just a POC though, you probably need more to avoid infinite Yeah, I spoke too soon. I thought I had it working. The syntax for doing this is a bit too tortured. John - To unsubscribe, e-mail: users-unsubscr...@httpd.