Saturday, June 09, 2012

Using nginx as a proxy to gunicorn / openerp


Following the by now best practices with 6.1, I am switching my prod and demo configruation to gunicorn. 
However, it is also recommended to setup a front-end to your server in order to make if faster and more robust.
 
Installing nginx on Ubuntu is easy as :
 
sudo apt-get nginx

setting up the server to proxy the gunicorn/ openerp, requires to add a site configuration in nginx. Here is a minimal version (it works but it contains no safety nor optimisation) :
 
server {
  listen 80;
  server_name demo.xxxx.be;
  location / {
    proxy_pass http://localhost:8069;
  }
}

See nginx.org for more info !

No comments: