I'm looking for a neat way to run few tornado apps behind nginx with
different prefixes. What I'm trying to achieve is smth like this:
upstream app1 {
server http://127.0.0.1:5001;
}
upstream app2 {
server http://172.0.0.1:6001;
}
server {
location /app1 {
proxy_pass @app1;
}
location /app2 {
proxy_pass @app2;
}
}
Now, this is all fine except for one thing - my apps get the full URIs
(prepended with "location" paths) and that's not really what I want:
GET /app1/some_url_in_app1
GET /app2/some_url_in_app2
I don't really want to change routes configuration in the apps, but
rather have some configurable prefix that Tornado automagically adds
in front of the paths (something like PrefixMiddleware in Pylons).
Is there such thing or should I start writing my own? ;)
Thanks for your help,
alex.
--
a lex 13 x
http://www.a13x.info