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

Multiple OpenERP instance with port redirection

By
Victor Godayer
on 6/11/14, 9:33 AM 1,898 views

Hi,

I am trying to setup a machine on which I want to host several OpenERP instances.

So I've made 2 servers configuration file for two OpenERP instances running on different ports.

Also I've created two Apache VHost, with proxy_pass in order to redirect :

- `openerp1.domain.com` to `openerp1.domain.com:port1`

- `openerp2.domain.com` to `openerp2.domain.com:port2`

 

But I still can't manage redirections based on subdomain value (openerp1 or openerp2)

When I access openerp2.domain.com, I get content from openerp1.domain.com

 

Here are is one of the vhost file:

 

<VirtualHost test.domain.net:80>
    ServerAdmin technique@domain.fr
    ServerName test.domain.net

    DocumentRoot /var/www
    LogLevel warn
    ErrorLog /var/log/apache2/cap_oe_template.error.log
    CustomLog /var/log/apache2/cap_oe_template.access.log combined

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

    ProxyPass / http://127.0.0.1:9069/
    ProxyPassReverse / http://127.0.0.1:9069/

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    # Fix IE problem (http error 408/409)                                                                                                                                                                           
    SetEnv proxy-nokeepalive 1
</VirtualHost>

 

the other vhost file is similar, the only changes are in :

`VirtualHost test2.domain.net`

`ServerName test2.domain.net`

`ProxyPass / http://127.0.0.1:8069/`
`ProxyPassReverse / http://127.0.0.1:8069/`

 

Have you ever try to host multiple OpenERP instances with redirection of the subdomain on the appropriate port on the same machine  ?

Do you see anything wrong in what I did ?

 

Thanks for your help

Cheers

0
Victor Godayer
On 6/11/14, 10:58 AM

I was missing the directive NameVirtualHost in my Apache configuration so the alphabetically first vhost file was overlapping the next one.

I added in the file /etc/apache2/httpd.conf

NameVirtualHost my.machin.ip:80

NameVirtualHost my.machin.ip:443

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: 6/11/14, 9:33 AM
Seen: 1898 times
Last updated: 3/16/15, 8:10 AM