Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
934 Lượt xem

We are using v18CE and already have databases 'foo' and 'bar', domain names foo.com and bar.com, and would like the following:


1) odoo.foo.com connects to the Odoo backend using database 'foo' (login screen)

2) foo.com connects to a website in database 'foo' (homepage)

3) abc.foo.com connects to another website in database 'foo' (homepage)

4) xyz.com connects to the third website in 'foo' database (homepage)

5) odoo.bar.com connects to the Odoo backend using database 'bar' (login screen)

6) bar.com connects to a website in database 'bar' (homepage)


Q1: What should we put in /etc/odoo/odoo.conf for dbfilter?

Do we have to use 'foo.com', 'bar.com' as database names instead of 'foo' and 'bar'?

Or even 'odoo.foo.com' and 'odoo.bar.com', because %h is the whole hostname?

I didn't see any restrictions or warnings about db names needing to be hostnames during setup.
But the CLI documentation page says "%h is replaced by the whole hostname the request is made on", which would mean yes, database names have to be full hostnames if we want to use multiple domain names.

dbfilter = ^%h$ should work, but only if the database names are odoo.foo.com and odoo.bar.com?

And the websites are configured differently? I will need to read https://www.odoo.com/documentation/18.0/applications/websites/website/configuration/domain_names.html


Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I'm answering my own question for posterity:

Yes, database names have to be full hostnames if we want to use multiple domain names.

dbfilter = ^%h$ works, but only because the database names are the full hostnames:
odoo.foo.com and odoo.bar.com

The fact there is no warning about this during setup is not good.

But duplicating existing, wrongly named databases (and deleting the original) is a viable solution.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 25
327
1
thg 3 25
959
1
thg 12 24
19
0
thg 2 25
1031
0
thg 7 25
305