跳至內容
選單
此問題已被標幟
3 回覆
9141 瀏覽次數

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,

頭像
捨棄
最佳答案

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

頭像
捨棄
作者

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.

作者

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.

作者

it's configured with wildcard sub domain *

最佳答案

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 !

頭像
捨棄

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!

相關帖文 回覆 瀏覽次數 活動
2
7月 25
352
4
6月 25
640
1
6月 25
923
1
5月 25
957
2
4月 25
1092