Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
9275 Vues

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
Ignorer
Meilleure réponse

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

Avatar
Ignorer
Auteur

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.

Auteur

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.

Auteur

it's configured with wildcard sub domain *

Meilleure réponse

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
Ignorer

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!

Publications associées Réponses Vues Activité
5
août 25
9872
2
juil. 25
992
4
juin 25
1119
1
juin 25
1442
1
mai 25
1352