How to put rewrite rules for multiple plone instances

Igor Sysoev is at rambler-co.ru
Fri Jan 16 16:49:30 MSK 2009


On Fri, Jan 16, 2009 at 05:18:25PM +0530, Vishnu Kumar D R wrote:

> Hi Igor,
> 
> Actually, I have this working config( it has only one plone site in
> /live/SBO)
> 
>   server {
>         listen       80;
>         server_name  w01.xxxxxxx.com;
> 
>         access_log  logs/plone.access.log  main;
>         location = / {
>             rewrite (.*) /live/SBO last;
>         }

BTW, it's better to use just:

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

>         location / {
>             proxy_pass http://localhost:6081;
>             include /usr/local/nginx/includes/proxy.conf;
>         }
>     }
> But, in the server mentioned below, all the plone sites exist in "/".
> Thats what i did.
> Suggestions?
> 
> > > Hi,
> > >
> > > I am having some 10 Plone sites running on a Zope instance in port 8002.
> > > I have configured it to run behind varnish port 6081.
> > >
> > > now, my nginx configuration is
> > >
> > >  server {
> > >         listen       80;
> > >         server_name server03.example.in;
> > >
> > >         #charset koi8-r;
> > >
> > >         #access_log  logs/host.access.log  main;
> >
> > This is a cycle.
> >
> > >         location = / {
> > >            rewrite (.*) / last;
> > >        }
> >
> > What do you intend by this ?
> >
> > >        location / {
> > >            proxy_pass http://localhost:6081;
> >
> > +            proxy_set  Host  $host;
> 
> Is this complusory?
> What it does?
> 
> >  >            include /usr/local/nginx/includes/proxy.conf;
> > >        }
> > >
> > > Is this right for the specified config?
> > > Cause its not working
> > > (Actually when we give our http://localhost:8002, It opens up the main
> > page,
> > > from there requests all handled for each site)
> >
> 
> Thanks
> Vishnu

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





More information about the nginx mailing list