
The Way Out
A Business focussed Blog on Open Source
| How to install OpenERP 6 on Ubuntu 10.04 LTS Server (Part 2 – SSL) |
| Written by Alan Lord |
| Saturday, 21 May 2011 10:10 |
|
This article follows on (hopefully not unsurprisingly) from part 1. In this post I’ll describe our current way of providing SSL encrypted access to a shiny new OpenERP server running on Ubuntu 10.04 LTS Server. We’re using the Apache webserver to act as a proxy and do SSL termination for web client access and for WebDAV/CalDAV access. The GTK client will also be running over an encrypted XMLRPC link directly to the OpenERP Server. Apache is the most widely used webserver in the world and there is oodles of documentation about it so I do not plan to go into any great detail about the configuration choices. One document that is worth pointing out however is the information about how to configure and administer Apache specifically under Debian/Ubuntu. The way Apache is packaged and set up is quite different from most other Linux distributions. A very useful document can be found here NB: For the purposes of this how to, we’ll be using self-signed certificates. A discussion of the pros and cons of this choice is beyond the scope of this article. Step 1. Install Apache and required modulesOn your server install apache2 by typing
Now we’ll tell apache that we want to use a few modules (mod_ssl, mod_proxy, mod_proxy_http, mod_headers and mod_rewrite [optional]) that are not enabled by default:
Next, we need to generate a SSL certificate and key. Step 2. Create your cert and keyI create the files in a temporary directory then move them to their final resting place once they have been built (the first
Then we generate a new key, you will be asked to enter a passphrase and confirm:
We don’t really want to have to enter a passphrase every time the server starts up so we remove the passphrase by doing this:
Next we need to create a signing request which will hold the data that will be visible in your final certificate:
This will generate a series of prompts like this: Enter the information as requested:
And finally we self-sign our certificate.
We only need two of the files in the working directory, the key and the certificate. But before we can use them they need to have their ownership and access rights altered:
And then we put them in a sensible place:
Now the key and certificate are safely stored away, we can tell Apache where they are: Step 3. Create the Apache site configuration fileWe create a new Virtual Host configuration file
with the following content:
Note there are two Proxy configurations. One for And then we can enable the new site configuration.
Optionally, you can use mod_rewrite to redirect any normal (non-encrypted) web browser traffic to the SSL port (443). To do this, add the following lines (outside of the
Step 4. Change the OpenERP server and web-client configuration filesThe next step is to re-configure the OpenERP server and Web client so that the non-encrypted services are not accessible from the outside world. In Make the following changes:
If you want to have WebDAV/CalDAV access add the following at the bottom of the config file.
Then in the web client config file /etc/openerp-web.conf make the following changes so that it also only accepts traffic from localhost:
That’s it. Step 5. Try it outRestart the services to load the new configurations
You should not be able to connect to the web client on port 8080 and the GTK client should not connect on either the NetRPC (8070) or XMLRPC (8069) services. For the web access you just need to visit https://your-ip-or-domain and in the GTK client you will need to use port 8071 and choose the XMLRPC (Secure) protocol. For CalDAV access the URL to a calendar will be something like this:
I hope that is helpful and obviously we’d love to hear comments and suggestions for improvements. |
Recent Articles
- How to install OpenERP 6 on Ubuntu 10.04 LTS Server (Part 2 – SSL)
- How to install OpenERP 6 on Ubuntu 10.04 LTS Server
- vtiger CRM 5.2.0
- Announcing vtiger CRM On Demand
- Does Microsoft think "Rip-Off Britain" is an instruction?
- Open Source, Open Standards and Re-Use: Government Action Plan
- BETT 2010 Review





