Reverse proxy and URL rewrite

Hi all,
I have a Python twisted server running behind nginx.

The twisted server expects to be deployed to serve results relative to /
However, I actually want it deployed at /buildbot.

Is there a way to mangle the request URL on its way through a proxy, so
that I can strip out the “/buildbot”?

Thanks,
James

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

Hello!

On Sat, Apr 11, 2009 at 08:44:56PM -0400, gefafwisp wrote:

Hi all,
I have a Python twisted server running behind nginx.

The twisted server expects to be deployed to serve results relative to /
However, I actually want it deployed at /buildbot.

Is there a way to mangle the request URL on its way through a proxy, so that I can strip out the “/buildbot”?

location /buildbot/ {
    proxy_pass http://your-backend-address/;
}

Note the trailing ‘/’ in proxy_pass, it’s uri component that will
replace part of uri matched by location.

Maxim D.

location /buildbot/ {
proxy_pass http://your-backend-address/;
}

Great, that’s got it - thanks!

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

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