Skip to Content
Menu
This question has been flagged
3 Replies
9122 Views

Dears,

I found that we can have different websites for different DBs, but I can't find how to access a DB specific website.

If I have Demo DB and XYZ DB what URL should I use to access Demo DB's website and what URL can I use to access XYZ DB's website.

I tried URL argument db=XYZ but it have no effect except in /web/login controller .

Also I tried /page/?db=XYZ and /page/website.homepage?db=XYZ but not working also.

Any Ideas ?

Regards,

Avatar
Discard
Best Answer

Start you server with --db-filter=^%d$

Avatar
Discard
Author

I want all websites to be accessible through URLs not only one website available.

Starting your server like this will allow you to use database names as subdomains eg. demodb.hostname and XYZ.hostname. If you want seperate URL's for each database, you might have look at setting up proxies with nginx or apache.

Author

Yes it's working now fine, after configuring the DNS and apache.

Mohamedhagag, how did you configure DNS and apache to get it to work? I am facing the same issues.

Author

it's configured with wildcard sub domain *

Best Answer

Richard,

What about if I need domians instead sub domains. Where I can find more documentation about db-filter?

I need:

www.abc.com => db = abc
www.pqs.com => db=pqs

Thanks in advance !

Avatar
Discard

I found the solution in this link: https://www.odoo.com/forum/Help-1/question/Domain-based-db-filter-6583 All works well with: openerp-server --db-filter='^%h$'

But I have an error, all my images does not work with this change. Any ideas. I can upload my images as links in others folder or site but I am curios and I will try to find the right solution. :)

I found the error: When I changed the name of DB to match with the instruction --db-filter='^%h$' does not change the folder's name where saves ODOO all my files (/home/admin/.local/share/OpenERP/filestore), only change this name (old_db_name) to (new_db_name) and now all works well again.

wow you solve many questions of mine, but i was wondering, what if i want a domain (mine) and subdomains (my clients)?? the only fast solution, and also kind of dumb, is to use --db-filter='^%d$' and name my db "www" so it will work but that is kind of dumb. I am just wondering if someone answers or not it doesnt matter. Have a nice day!

Related Posts Replies Views Activity
2
Jul 25
273
4
Jun 25
603
1
Jun 25
884
1
May 25
940
2
Apr 25
1046