跳至內容
選單
此問題已被標幟
7 回覆
17976 瀏覽次數

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.

頭像
捨棄
最佳答案

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

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

頭像
捨棄
最佳答案

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.

頭像
捨棄
最佳答案

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

頭像
捨棄
最佳答案

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



頭像
捨棄
最佳答案

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

頭像
捨棄
最佳答案

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


頭像
捨棄
最佳答案

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
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
5月 23
8287
0
6月 17
5647
0
2月 20
94
1
7月 22
2442
4
5月 25
2303