Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
12562 Widoki

I cannot find anything about multi website other just how to create it in odoo. But this doesn't help in any way.

I've got a server with nginx reverse proxy. The server hosts a few odoo databases so it is configured with dbfilter = ^%h$, so the databases are named same as the domains. Now I need to have multi website on one database.

One needs to be accessed from shop.mysite.com the other shop2.mysite.com. The database is named shop.mysite.com.

In odoo I configured the domains for this two sites, created a nginx vhost for shop2.mysite.com that accesses odoo. When I access shop2.mysite.com I'mredirected to the database creation page.

I've tried with redirect to shop.mysite.com. But it just loads that site.

What must I do to get this working?

 

Awatar
Odrzuć

How do you finnaly solve it ?

Autor

@zahid With the instructions from Ermin Trevisan post below.

@Samo . it does not work. it only works with subdomain configuration : ( 2 sudoamine, 1 company, 1 database):
- sub1.company.com
-sub2.company.com
Nothing i found on line si working for my conf: ( 2 domaines,2 companies, 1 database):
- www.company1.com
- www.company2.com

Najlepsza odpowiedź

You may think about using the OCA module dbfilter_from_header, this might get you the idea:

 https://www.odoo.com/forum/help-1/odoo-14-multi-site-multi-company-same-server-shared-database-not-forwarding-traffic-to-the-correct-domain-182679#answer-182686

Awatar
Odrzuć
Autor

I tried but it still redirects to the database creation form. I do not quite get the nginx proxy header. proxy_set_header X-Odoo-dbfilter [your filter regex]; If I add ^%h$ nginx fails.

You have to set the header X-Odoo-dbfilter to the "databasename", not to a regex expression and in the odoo.conf file you have to let pass everything in the dbfilter (dbfilter = .*)

Exactly as I have described in my linked post.

Autor

Now it works... thanks. Do you have any experiance how this works for payment acquirers, because normally the domain has to be the correct one in web.base.url so normally I need to set web.url.freeze to make payments work.

Najlepsza odpowiedź

Hi, you can follow this: https://youtu.be/-3wV7A_4s-w

Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
cze 24
2330
2
gru 23
14643
0
paź 23
33
3
paź 23
788
1
paź 23
569