Internally redirected requests

How to do internal redirect (which is the best way)? I do not want to
apply
to this “include”.
Maybe I can do something like this:

location /a { alias @app; }
location /b { alias @app; }

location @app { … }

Should I use to this “error_page” or “try_files” if I do not dealing
with
static files ?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233074,233074#msg-233074

On Wed, Nov 21, 2012 at 6:12 PM, nri.pl [email protected] wrote:

static files ?

you can use try_files /nonexistent @app; though I’m interested why
don’t you want to use include.

Heterogeneous environment.
I can not use “incude” because the configuration file is generated by
the
application. I am responsible for the deployment. Problematic is for
application developers to generate and manage multiple configuration
files,
much easier to manage one file.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233074,233080#msg-233080

On Wed, Nov 21, 2012 at 06:12:40AM -0500, nri.pl wrote:

static files ?
location /a {
return 418;
error_page 418 = @teapot;
}

location /b {
return 418;
error_page 418 = @teapot;
}

location @teapot {
return 200 “uri=$uri\nargs=$args\n”;
}

See:

http://nginx.org/r/internal
http://nginx.org/r/error_page

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs