[BlueBream] proxy rewrite rule for nginx

Baiju M baiju.m.mail at gmail.com
Tue Sep 7 13:49:50 EDT 2010


Hi,

I was trying to deploy an application using nginx+gunicorn
as given here:
http://gunicorn.org/deploy.html

But my "site" is located inside folder like this:

http://127.0.0.1:8000/site

I guess I need to use a "rewrite" directive before proxy_pass.

In the gunicorn docs they used an "if" so I tried "rewrite" like this:
rewrite ^/(.*)$ /site/++vh++http:domain.com:80/site/++$1 break;

based on:
http://wiki.zope.org/zope3/virtualhosting.html

I also tried as given here, but it's not working:
http://grok.zope.org/documentation/how-to/grok-virtual-hosting-and-nginx

Any idea ?

Regards,
Baiju M


More information about the bluebream mailing list