Use rewrite /blog to transparently proxy to another app

Fernando Perez lists at
Mon Aug 2 20:11:24 MSD 2010


I have various applications running RoR. In order to improve code
maintenability I have decided to use a single blog application that will
be used by different apps.

So a user will be browsing app1 at:

And when he wants to check out the blog of app1 he goes to: which behind the scene transfer the request to my blog

I tried the following:

server {
  location ^~ /blog/ {
    proxy_set_header Host $http_host;
    proxy_pass http://blog$uri;

But it seems to ∞ly redirect the request.

Thanks for your upload
Posted via

More information about the nginx mailing list