Hello, I have a question, I hope you can help me:
If I want to filter the DB by subdomain, ie: pharmacy.sample.com (select the DB "pharmacy"), cellar.sample.com (select the DB "cellar"), shoe.sample.com (select the DB "shoe").
I use the following: --db-filter=^%d$ And it works great!
But if I require filter the DB by domain, ie: erp.pharmacy.com (select the DB "pharmacy"), erp.cellar.com (select the DB "cellar"), erp.shoe.com (select the DB "shoe").
So what I should put in "--db-filter"?
Of course, thank you very much for your help and cooperation!
check with this link:
I had a similar problem. It is not possible with Odoo to filter db's on anything other than the subdomain or, if the subdomain is 'www', the domain. I wanted to map company domains to different dbs, like this:
http://accounts.company1.com => db = company1
http://accounts.company2.com => db = company2
To fix this, I had to modify the function db_filter in http.py:
if d == "www" and r:
if (d == "www" or d == "accounts") and r:
You can have different prefixes you want.
I tried using your suggestion of --db-filter=^%h$, but it did not work. From my understanding %h would be "sub.domain.com". I tried creating a database that was called "domain" and it did not work, so I tried creating "sub.domain.com", but it said that was invalid, so I tried "subdomaincom" and that still did not work, any ideas? (Odoo V8)
UPDATE: I believe this is not possible using only Odoo, I believe you have to use a 3rd party application like Apache or NGINX.
I found this guide for Reverse SSL Proxy with NGINX: http://www.schenkels.nl/2013/01/reverse-ssl-proxy-using-nginx-with-openerp-v7/
Anyone have any documentation relating directly to routing domains? Thanks!
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/25/14, 5:04 PM|
|Seen: 3906 times|
|Last updated: 12/12/15, 10:47 PM|