Installation Of OpenERP Server 5.0, OpenERP GTK Client 5.0 And OpenERP Web Client 5.0.1 On Ubuntu Server 9.0.4 & Desktop 9.04 - Page 3

HTTPS with Apache

$ sudo apt-get install apache2
$ sudo a2enmod ssl
$ sudo a2ensite default-ssl
$ sudo /etc/init.d/apache2 restart


Forcing Apache to redirect HTTP traffic to HTTPS

Choose a ServerName/URL for your OpenERP Web service, like

$ sudo vi /etc/apache2/sites-available/default

<VirtualHost *:80>
 Redirect /
$ sudo a2enmod proxy
$ sudo a2enmod proxy_http
$ sudo a2enmod proxy_connect
$ sudo a2enmod proxy_ftp

Add your server’s IP address and URL in /etc/hosts:

$ sudo vi /etc/hosts

Replace       localhost       yourhostname

With     localhost
192.168.x.x yourhostname
$ sudo vi /etc/apache2/sites-available/default-ssl
<VirtualHost *:443>
 ServerAdmin webmaster@localhost
<Proxy *>
 Order deny,allow
 Allow from all
 ProxyRequests Off
 ProxyPass        /
 ProxyPassReverse /

Restart Apache:

$ sudo /etc/init.d/apache2 restart

Check out your URL with a browser:


Block OpenERP Web server port 8080 with a firewall

Do it locally as the first command will close all the existing ssh connections:

$ sudo ufw enable
$ sudo ufw allow ssh
$ sudo ufw allow http
$ sudo ufw allow https

Add the following lines:

Ubuntu Server 9.0.4:

$ sudo vi /etc/openerp-web.cfg

Ubuntu Desktop 9.0.4:

$ sudo vi /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg

base_url_filter.on = True
base_url_filter.use_x_forwarded_host = False
base_url_filter.base_url = ""

!Be careful with the quotation marks in config files like the last one! if you copy and paste, be sure the text you copy from is preformatted or you might not be able to start openerp-web INIT script (/etc/init.d/openerp-web start). The previous three lines have been preformatted. Type the quotation marks if you encounter problems or you want to be sure.

Restart openerp-web:

$ sudo /etc/init.d/openerp-web restart

Check out again your server’s URL

Administrator: admin / openerp

Demo user: demo / demo

Restart the server with “sudo init 6” and make sure that all the openerp processes are started automatically as non-root.


References & Demo Server

OpenERP Video guides can be found at

Demonstrations (Login: demo / Password: demo):

Open Object is an open source Rapid Application Development framework in Python:

Another demo server can be found at , with the following users and passwords:


Open ERP Spain:

Open ERP Site (Spanish)

Open ERP modules for Spain (a must read):

How to download modules and latest versions from Launchpad (in Spanish)

Install extra modules:

Global Module Index:

Another real budget (in Spanish, a must read):

Useful advices (in Spanish, a must read):

Original article written by the author can be found at 


A Shell script written by the author eases and automates the installation of openerp-server 5.0 with openerp-web 5.0.1 for Ubuntu 9.0.4:


1. start-openerp-web fails with the following error:

$ sudo -u openerp start-openerp-web


$ start-openerp-web
Traceback (most recent call last):
  File "/usr/bin/start-openerp-web", line 8, in <module>
    load_entry_point('openerp-web==5.0.1-0', 'console_scripts', 'start-openerp-web')()
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/openerp/", line 58, in start
    turbogears.update_config(configfile=configfile, modulename="openerp.config")
  File "/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/", line 207, in update_config
    configdict = config_obj(configfile, modulename).dict()
  File "/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/", line 193, in config_obj
    configdata2 = ConfigObj(configfile, unrepr=True)
  File "build/bdist.linux-x86_64/egg/", line 1219, in __init__
  File "build/bdist.linux-x86_64/egg/", line 1302, in _load
configobj.UnreprError: Parse error in value at line 27.

Workaround: This could happen once openerp-web has already been run for first time through the INIT script. As this means that the INIT script works, just launch openerp-web with "sudo /etc/init.d/openerp-web start"

2. start-openerp-web fails with the error: Can't extract file(s) to egg cache

$ start-openerp-web

File "/usr/lib/python2.5/site-packages/", line 887, in extraction_error                                                                                 raise err
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg cache:
[Errno 13] Permission denied: '/home/user/.python-eggs'
The Python egg cache directory is currently set to:
Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory.


$ sudo -u openerp PYTHON_EGG_CACHE=/home/openerp/.python-eggs/ start-openerp-web

Share this page:

5 Comment(s)