Use rewrite /blog to transparently proxy to another app

Fernando Perez lists at ruby-forum.com
Tue Aug 3 00:01:26 MSD 2010


Sorry for the typos, trialing should read trailing.

Here is the complete thing for those interested, your mileage may vary 
depending how you want the backend app to handle /blog/uri or just /uri

location ^~ /blog/ {
  rewrite                  /blog/(.+) $1 break;
  proxy_set_header         Host $http_host;
  root                     /optional/root;
  proxy_pass               http://127.0.0.1:3000/$1;
}
-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list