How to put rewrite rules for multiple plone instances

Igor Sysoev is at rambler-co.ru
Sat Jan 17 11:08:23 MSK 2009


On Sat, Jan 17, 2009 at 12:02:42PM +0530, Vishnu Kumar D R wrote:

> On Fri, Jan 16, 2009 at 9:10 PM, Igor Sysoev <is at rambler-co.ru> wrote:
> 
> > This rewrite:
> >
> >     if ($host ~* klk\.example\.com$) {
> >          location = / {
> >             rewrite (.*) /Kolkata last;
> >         }
> >     }
> >
> > is not possible, but this one:
> >
> >     location = / {
> >          if ($host ~* klk\.example\.com$) {
> >              rewrite (.*) /Kolkata last;
> >         }
> >     }
> >
> > is possible. However, it's much better to create separate server for every
> > non-generic server, then to write a lot of if/rewrite's.
> >
> >
> > --
> > Igor Sysoev
> > http://sysoev.ru/en/
> >
> >
> Thank you very much Igor,
> I have gained some expertise in Nginx :)
> 
> Also, How do we make rewrite invisible to viewers, cause the rewrite is
> visible for every link in the site klk.example.com.

These rewrite's are internal and invisible for client.
However, it's better to use just:

          location = / {
              proxy_pass http://localhost:6081/Kolkata;
              include /usr/local/nginx/includes/proxy.conf;
          }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list