Internally redirected requests

How to do internal redirect (which is the best way)? I do not want to
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
static files ?

Posted at Nginx Forum:,233074,233074#msg-233074

On Wed, Nov 21, 2012 at 6:12 PM, [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
application. I am responsible for the deployment. Problematic is for
application developers to generate and manage multiple configuration
much easier to manage one file.

Posted at Nginx Forum:,233074,233080#msg-233080

On Wed, Nov 21, 2012 at 06:12:40AM -0500, 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”;


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