Running Plone With NGINX

NGINX is a fast lightweight webserver that is generating a lot of buzz lately.

Even though I have had no complaints using Apache with PHP,mod_python, and fastcgi applications, configuring Zope to work well with Apache was always "iffy".

In contrast, configuring plone to work on NGInx was quite pain-free even accounting for the learning associated with NGINX.

This is the configuration:

server {
    listen 80;
    server_name btbytes.com;
    access_log logs/btbytes.access.log ;
    location = / {
        rewrite (.*) /btbytes last;
    }
    location / {
        proxy_pass http://127.0.0.1:8120;
        include /usr/local/nginx/conf/proxy.conf;
    }
    error_page 404 /404.html;
    location = /404.html {
        root html;
    }
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root html;
    }
}

h3. Notes

/btbytes is the plone-site instance running inside zope. rewrite (.*) /btbytes last; will redirect all requests to btbytes.com to /btbytes plone-site.

The proxy.conf is a standard proxy.conf downloaded from NGINX site.

Also, edit the VHM at the siteroot to add mapping. Eg: btbytes.com/btbytes

§