Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
7 Antworten
17964 Ansichten

I am using Odoo 10

I have two website themes in Odoo. For example Theme 1 and Theme 2

I also have 2 domain names purchased from GoDaddy. For example www.abc.com and www.xyz.com.

I have a cloud space having an ip, for example 132.33.4.177

How can i run the two themes in the same Odoo server?

In GoDaddy we can point the ip to run the website, but here how can we use the same IP address for both themes.

I know we can configure in apache to run from different ports, and do domain forward from domain.

But i would like to know is there any other solution than domain forwarding for this.

Avatar
Verwerfen
Beste Antwort

You can buy this module from odoo apps which will fulfil your needs.

\https://apps.odoo.com/apps/modules/10.0/website_multi_company/

Avatar
Verwerfen
Beste Antwort

If you want to serve multiple domains with multiple databases, whereas each domain is connected to one particular database, it is best to run Odoo using the dbfilter option, see https://www.odoo.com/documentation/10.0/setup/deploy.html. If you want to serve multiple websites from one database, it is not officially supported and does not work flawlessly. Check the web for Odoo and Website multi or similar and you'll find plenty of content regarding this topic.

Avatar
Verwerfen
Beste Antwort

Yes you can do that in 2 database (if default odoo instalation without buy module multiple website)

1 odoo server

2 database

2 domain

You can setting with dbfilter

Avatar
Verwerfen
Beste Antwort

Hi ,

you have to decide , like what the above advices given , 

1. to host it with each domain has it's own database on the same IP (recommended)

or

2. to host it with all domains on the same IP ( not commonly practice ) in ONE db, with this method,

i saw a few modules out there , some needs to pay , like this one , https://www.odoo.com/apps/modules/10.0/pr1_multi_website/ , not sure if this is what you are looking for ?

Thanks.

kalmen



Avatar
Verwerfen
Beste Antwort

Always and always i suggest use other webserver like apache / nginx and as Imran said configure those.

Avatar
Verwerfen
Beste Antwort

You should use apache / nginx and configuration of your /etc/hosts file to direct traffic from www.abc.com to the correct instance of Odoo and same www.xyz.com


I am assuming the themes are at least for two separate DBs, i don't think its possible within the same Odoo DB.  We have done similar multiple DBs on same host server, but you can also run multiple Odoo Servers with different ports on same server


Avatar
Verwerfen
Beste Antwort

you can alter the domain part in ir_http to return correct urls. 

i have x-forward-proto for detecting http/https for proper url generation. 

def _get_root_url(trim=False):
"""
add X-Forwarded-Proto
:param trim:
:return:
"""

url_root = request.httprequest.url_root

if trim is True:
url_root = request.httprequest.url_root[:-1]

for k, v in request.httprequest.headers.items():
if k.lower() == 'x-forwarded-proto' and v.lower() == 'https':
url_root = re.sub(r'^http://', 'https://', url_root)
break

return url_root
Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Mai 23
8277
0
Juni 17
5642
0
Feb. 20
94
1
Juli 22
2435
4
Mai 25
2289