Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

how many installation for 2 companies

url
By
Frank MIKELDUKE
on 3/20/13, 6:42 PM 3,573 views

Hello,

If I want to run openerp for two different customer... company1 and company2 on the same server.. do I have to install openerp twice or do I have to install openerp just one time and create 2 different database?

I would like two different url company1 on company1.com and company2 on company2.com

Is this possible?? or the companies url have to be server.com:8069?

Thank you for your reply

Frank

0
Ian Beardslee
On 3/20/13, 8:38 PM

You can create two separate databases with the same installation.

They can then either choose the database (eg company1) from the drop down list or you can give them the URL that just goes straight to their database .. eg http://openerp.server.com:8069/?db=company1

With the above options people can see what other companies you also be looking after (from the dropdown list).

To get their individual companies pointing to their own url eg openerp.company1.com (of course preferably using https!) by getting their dns entries pointing to your server and using an apache proxy to do some redirects/rewrites to point it at the correct url. The 8069 port hides behind the http proxy.

I haven't tried to do the above http proxy bit, but I use the same process to redirect http://openerp to https://openerp.ourcompany.com [EDIT: err no just the http to https]

Here are the docs I use to do get things working with https ...

The web client doesn't do https so the webclient needs to be configured to listen only to the local host, and we'll use an apache https proxy. The original kick start I used was .. http://doc.openerp.com/v5.0/install/linux/web/index.html#configure-https

Install apache and enable the appropriate modules.

 apt-get install apache2
 a2enmod ssl proxy_http headers rewrite

For certificates you can use the local certificates. Most browsers will probably complain about them, but until you get real certificates ..

 apt-get install ssl-cert
 make-ssl-cert generate-default-snakeoil --force-overwrite

The example site config ..

#####
# /etc/apache2/sites-available/openerp-ssl
<VirtualHost *:443>

SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyVia On

ProxyPass / http://127.0.0.1:8069/
<location / >
ProxyPassReverse /
</location>

RequestHeader set "X-Forwarded-Proto" "https"

# Fix IE problem (httpapache proxy dav error 408/409)
SetEnv proxy-nokeepalive 1

</VirtualHost>
#####

Enable the SSL site with ..

 a2ensite openerp-ssl

We can either disable the port 80 of this site or rewrite to go :443 .. I go with the redirect.

# /etc/apache2/sites-available/default
#..
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
#..

And then restart Apache

 /etc/init.d/apache2 restart

Nice Ian, this is excatly what I am looking for.. could you give me link to 1- use the apache proxy and how to configure it? and 2- how to configure or set up the hhtps please. Frank

Frank MIKELDUKE
on 3/21/13, 5:21 AM

Updated my answer with how to configure the https and the redirection from port 80 to port 443 (http -> https). Sorry, haven't actually redirected from one url to another domain and thinking about it further it'll probably cause some problems with certificates.

Ian Beardslee
on 3/21/13, 9:10 PM

Hi Ian, I use CentOS. The main question is to know if it is possible to give for each companies a different URL and not a subdomain URL. I'd like to know if it is possible to have http://company1.com for one database and http://company2.com for a second database. Thank you

Frank MIKELDUKE
on 3/22/13, 5:19 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/20/13, 6:42 PM
Seen: 3573 times
Last updated: 3/16/15, 8:10 AM