Community mailing list archives

community@mail.odoo.com

Re: Muliple Odoo Website on single port

by
Richard
- 05/18/2016 03:40:37
Have you tried it with a rewrite rule in apache?

<VirtualHost  iP_of_server:8080>
ServerName site name4
ServerAlias www.sitename4
RewriteEngine on
RewriteRule ^/(.*) http://127.0.0.40:8069/$1 [P]
ProxyPassReverse / http://127.0.0.40/ Keepalive=On

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



On 17 May 2016 at 15:52, zoya patel <zoya27p@gmail.com> wrote:
Thanks robert for your reply.

It is not caching problem.

if i refresh your browser (F5) dos it still load the wrong page.

It is loding wrong page from server itself.

This is somewhat complex and interesting stuff.

On Tue, May 17, 2016 at 4:57 PM, robert rottermann <robert@redcor.ch> wrote:

never done such a configuration.
But this sounds like a caching problem.
if you refresh your browser (F5) dos it still load the wrong page?

robert

On 17.05.2016 11:53, zoya patel wrote:
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.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe