Nginx for proxy + rewrite

Pavel Georgiev pavel at
Wed Feb 27 21:30:47 MSK 2008

Hi, List!

I`ve beed using nxingx as a local balancer for few backend servers:

http {
   upstream {
      server; # backend server
   server {

      location / {
         proxy_pass ;
         proxy_redirect       off;
         proxy_set_header     Host $host;

What I need to do is for a certain url to rewrite it to an external url but 
serve the requests as a proxy instead of returing a redirect, so this is 
transparent to the client:*)$ should go to$1

I saw this is possible with a simple rewrite but it returns a redirect to the 
client. Is is possible to make nginx to server the rewrite as a proxy?

More information about the nginx mailing list