How to put rewrite rules for multiple plone instances
Igor Sysoev
is at rambler-co.ru
Fri Jan 16 18:40:02 MSK 2009
On Fri, Jan 16, 2009 at 08:55:47PM +0530, Vishnu Kumar D R wrote:
> Thanks Igor,
>
> Its working
>
> >
> >
> > Then you do not need this location:
> >
> > location = / {
> > rewrite (.*) / last;
> > }
> >
> > at all.
> >
> > I look like a fool now.
>
> Anyway, is this rewrite possible( for two domains server03.example.com and
> klk.example.com)
>
> if ($host ~* klk\.example\.com$) {
> location = / {
> rewrite (.*) /Kolkata last;
> }
> }
> location / {
> proxy_pass http://localhost:6081;
> include /usr/local/nginx/includes/proxy.conf;
> }
>
> Meaning that for server03 no rewrite and for klk rewrite to /Kolkata
> (since both domains are in same zope instance running behind varnish)
> Or do i have to create separate server config for both domains
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/
More information about the nginx
mailing list