Yaazkal
Yaazkal

Reputation: 130

About dbfilter not catching the correct database on Odoo 13

I have example.com site that is now subdomain.example.com (had been renamed to that subdomain)

On my odoo config file I have:

dbfilter = ^%d$

The database name is example. As far as I know, that should still catch the database but seems that I can't access the site. Not sure if it's an odoo issue or if I'm missing something on my nginx configuration which is this: https://pastebin.com/KJxbJPKz (this used to work when the site was named example.com, I made the corresponding changes)

I'm mentioning nginx because I'm getting the 404 error specified when accessing port 80 and not port 443 which is weird since I'm accessing the site using https

I must clarify that the corresponding upstreams are defined and working (I have other sites working on that server)

Upvotes: 1

Views: 3687

Answers (4)

trevi
trevi

Reputation: 61

dbfilter = ^%d$

does catch the domain only, when www is the subdomain. If you want to catch the domain name in a constellation like subdomain.domain.com, then you have to set the host parameter %h.

Upvotes: 0

karan-negx
karan-negx

Reputation: 1

You have to enter the string of the database name in the dbfilter key in the odoo.conf file

For example: if the database's name is test then dbfilter = ^test$ or ^tes$

Upvotes: 0

Yaazkal
Yaazkal

Reputation: 130

As a misunderstanding, I thought that setting dbfilter = ^%d$ will catch the database called example regarding of the subdomain name.

So I thought and saw some forum answers pointing that sub.example.com, as well as othersub.example.com, will select example as the database as it was the domain. But it works the other way. I mean Working in this way, if subdomain.example.com is your site, and dbfilter is set as before, the database name should be subdomain and not example.

My solution was to rename the database to subdomain and after that regenerate the web assets so it works properly now.

Upvotes: 3

Dipen Shah
Dipen Shah

Reputation: 2444

You are filtering Database names equal to a subdomain, So you need to manually enter every subdomain in /etc/hosts, only then it starts working.

Thanks

Upvotes: 0

Related Questions