Community mailing list archives

community@mail.odoo.com

Muliple Odoo Website on single port

by
zoya patel
- 05/17/2016 05:47:21
Hello Community,

We are running four website with different home page and menu in single db on odoo. It works as expected but some time it shows randome behaviour like if i enterd name of site1 and it loads pages of site2. There is no fix behaviour but yes once it load any site in browser it will load same for remaining three if i it open one by one.

Let me show you first what we have done as configuration:
1> we run our server on port 8069, with db filter= our_db_name
2> After login in db we have done configuration for website admin.

for website "site1":
    domain: 127.0.0.10

for website "site2":
    domain: 127.0.0.20

for website "site3":
    domain: 127.0.0.30

for website "site4":
    domain: 127.0.0.40

3> We have created different home pages and menus for each website.

4> Apache configuration:

<VirtualHost iP_of_server:8080>
        ServerName site1.in
        ServerAlias www.site1.in
        ServerAdmin admin@site1.in

        #ProxyPass /longpolling http://127.0.0.10:8072/longpolling
        #ProxyPassReverse /longpolling http://127.0.0.10:8072/longpolling

        ProxyPass / http://127.0.0.10:8069/
        ProxyPassReverse / http://127.0.0.10:8069/

        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/site1.in.access.log combined
</VirtualHost>

<VirtualHost iP_of_server:8080>
        ServerName site2.com
        ServerAdmin admin@site2.com
        ServerAlias www.site2.com
        #ProxyPass /longpolling http://127.0.0.20:8072/longpolling
        #ProxyPassReverse /longpolling http://127.0.0.20:8072/longpolling

        ProxyPass / http://127.0.0.20:8069/
        ProxyPassReverse / http://127.0.0.20:8069/

        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/site2.com.access.log combined

</VirtualHost>

<VirtualHost iP_of_server:8080>
        ServerName site3.us
        ServerAdmin admin@site3.us
        ServerAlias www.site3.us
        #ProxyPass /longpolling http://127.0.0.30:8072/longpolling
        #ProxyPassReverse /longpolling http://127.0.0.30:8072/longpolling

        ProxyPass / http://127.0.0.30:8069/
        ProxyPassReverse / http://127.0.0.30:8069/

        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/site3.us.access.log combined
</VirtualHost>

<VirtualHost iP_of_server:8080>
        ServerName site4.com
        ServerAdmin admin@site4.com
        ServerAlias www.site4.com
        #ProxyPass /longpolling http://127.0.0.40:8072/longpolling
        #ProxyPassReverse /longpolling http://127.0.0.40:8072/longpolling

        ProxyPass / http://127.0.0.40:8069/
        ProxyPassReverse / http://127.0.0.40:8069/

        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/site4.com.access.log combined
</VirtualHost>

Now If i run all sites using differnet ports it works but for same port it creates issue. I dont think we need to run multiple service of odoo for multi website behaviour. I am not sure where i am missing but it can be bacuse of apache or odoo configuration.

Any help or suggestion will be helpful.

Thanks.