Welcome! Log In Create A New Profile

Advanced

Re: Directly redirecting prefix location to named one

Lord Nynex
May 15, 2014 08:54PM
http://wiki.nginx.org/HttpEchoModule#echo_exec

I use this model in some parts of my configs. I, however, use openresty and
I'm not clear if there are any functionality differences between them.


On Wed, May 14, 2014 at 5:58 PM, B.R. <reallfqq-nginx@yahoo.fr> wrote:

> I am considering the following locations:
>
> location / {
> proxy_pass http://upstream;
> }
>
> location /documents/ {
> try_files $uri @upstream;
> }
>
> location @upstream {
> proxy_pass http://upstream;
> }
>
> I would like to have a single named location to handle all fallbacks to
> upstream (to avoid duplication: maintenance will be easier!).
>
> How does one redirect a prefix location directly to a named one?
> Using try_files might expose documents which are not supposed to be served
> outside of the /documents/ tree.
>
> Using rewrite? I learned here to avoid it as much as possible...
> ---
> *B. R.*
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Directly redirecting prefix location to named one

B.R. May 14, 2014 09:00PM

Re: Directly redirecting prefix location to named one

Lord Nynex May 15, 2014 08:54PM

Re: Directly redirecting prefix location to named one

Yichun Zhang (agentzh) May 16, 2014 04:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 286
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready