Posted in Configuration, OpenERP, OpenERP 7.0

Configure OpenERP with NGINX and GUNICORN


NGINX (engine x) is an open source web server and a reverse proxy server for HTTP, SMTP, POP3, and IMAP protocols.

Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP Server for UNIX.

Lets configure OpenERP with NGINX and GUNICORN.

To start with installing NGINX.

sudo apt-get install nginx

It is also running on default port 80.

Now lets install Gunicorn by following command.

sudo apt-get install gunicorn

Now we have to create Certificate and SSL Key.
It will asked user to input passphrase.

1.generate-ssl-key

You can remove passphrase by performing following actions:

2.generate-ssl-key

Now generate certificate and signed it.

3.ssl-certificate

4.sign-ssl-certificate

Create site configuration file for NGINX.

5.site-available

Creating this symbolic link : /etc/nginx/sites-enabled

sudo ln -s /etc/nginx/sites-available/openerp /etc/nginx/sites-enabled/openerp

After that restart nginx:

sudo service nginx restart

Require changes for gunicorn. You can find file on this path : /server/openerp-wsgi.py

6.gunicorn-config

bind: OpenERP address with port
workers: No. of instance required to create

Now start OpenERP with Gunicorn.

7.openerp-gunicorn

You can see no. of process execution.

8.openerp-gunicorn-processes

Now, you are able to access OpenERP with GUNICORN and NGINX.

9.nginx-openerp

Advertisements

Author:

Specialised in OpenERP/CRM Solutions, software development, Web development, E commerce solutions & other open source solutions.

5 thoughts on “Configure OpenERP with NGINX and GUNICORN

  1. Nice tutorial. but something not work for me, i always get the error:
    File “openerp-wsgi.py”, line 23, in
    import openerp

    have you any idea how i can fix this?

  2. Failed to read config file: /tmp/openerp/openerp-wsgi.py
    Traceback (most recent call last):
    File “/usr/lib/python2.6/site-packages/gunicorn/app/base.py”, line 51, in load _config_from_file
    execfile_(filename, cfg, cfg)
    File “/tmp/openerp/openerp-wsgi.py”, line 43, in
    openerp.service.server.load_server_wide_modules()
    AttributeError: ‘module’ object has no attribute ‘server’

    any ideas?

  3. Nice Turorial can you explain how to demonized the gunicorn process in this tutorial you manually run the openerp using gunicorn command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s