Community mailing list archives

community@mail.odoo.com

Re: Odoo server tool module dbfilter_from_header

by
Skillteam, Houssine BAKKALI
- 07/24/2015 09:34:41
Can't help with apache i rather use nginx and it's pretty straight forward with dbfilter_from_header ...



2015-07-24 12:39 GMT+02:00 Ermin Trevisan <trevi@twanda.com>:

Thanks for your reply, that's what I supposed, but on the other hand I was not able to set up the Apache vhost file properly in order to recognize the database despite of setting the db-filter option in the openerp-conf file, so I am rather clueless...

On 24.07.2015 11:47, Houssine BAKKALI wrote:
<blockquote cite="mid:CANNbhR_JOGbe3bTbxs4Zt-mfzou8nz-vyJo2_LRYqhPDf9SsGA@mail.gmail.com" type="cite">
Hi,

You only need the db_filter_from_header module if your database name doesn't match your domain or subdomain name otherwise db_filter parameter should be enough...

2015-07-24 9:06 GMT+02:00 Ermin Trevisan <trevi@twanda.com>:

Does anybody know how to pass the dbname as a parameter from the url without explicitely defining it?

Such as:

Header add X-ODOO_DBFILTER subdomain-as-parameter

RequestHeader add X-ODOO_DBFILTER subdomain-as-parameter



On 24.07.2015 05:57, Yoshi Tashiro wrote:
<blockquote cite="mid:019601d0c5c3$3e86a350$bb93e9f0$@roomsfor.hk" type="cite">

Hi Yassine,

 

We followed below steps before.  We used Apache but it should be similar with Nginx.

 

 

>>>

 

 

1. Install db_filter_from_header in one of the databases

 

2. Update the config file (odoo-server.conf)

Update ‘server _wide_modules’ to be like this:

server_wide_modules = web,web_kanban,dbfilter_from_header

3. Restart Odoo service

 

4. Update web Apache config file

Separate VirtualHost entries per sub-domain

 

---

NameVirtualHost *:443

<VirtualHost *:443>

       ServerName prod.example.com

       ProxyRequests Off

       ProxyPass / http://xxx.xxx.xxx.xxx:8069/

       ProxyPassReverse / http://xxx.xxx.xxx.xxx:8069/

       RequestHeader set "X-Forwarded-Proto" "https"

       Header add X-ODOO_DBFILTER "production"

       RequestHeader add X-ODOO_DBFILTER "production"

.

.

.

</VirtualHost>

<VirtualHost *:443>

       ServerName test.example.com

       ProxyRequests Off

       ProxyPass / http://xxx.xxx.xxx.xxx:8069/

       ProxyPassReverse / http://xxx.xxx.xxx.xxx:8069/

       RequestHeader set "X-Forwarded-Proto" "https"

       Header add X-ODOO_DBFILTER "test"

       RequestHeader add X-ODOO_DBFILTER "test"

.

.

.

</VirtualHost>

---

 

5. Restart Apache

 

 

Regards,

----------------------------
Yoshi Tashiro

 

From: Yassine Teimi [mailto:yteimi01@gmail.com]
Sent: Friday, July 24, 2015 12:39 AM
To: Community
Subject: Odoo server tool module dbfilter_from_header

 

Dears, 

 

Can you explain to me more about how to use this module ? It says that it allows

 you to pass a  dbfilter as a http header, but how ? 

 

Is it when I configure a routing of my domain name request to a specific database, using Nginx ? Or it's manually by typing on the url ? 

 

Please help. 

 

 

Many Thanks. 

-- 

 

Cordialement

 

Yassine TEIMI

 

Consultant & Odoo Project Manager

TEL : +212 6-27 33 30 78

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


-- 
twanda AG
Ermin Trevisan
Artherstrasse 19
CH-6318 Walchwil 
T    +41 41 758 1515
M    +41 79 208 7373
E    trevi@twanda.com 
www.twanda.ch
www.ipadweinkarte.twanda.ch

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


-- 
twanda AG
Ermin Trevisan
Artherstrasse 19
CH-6318 Walchwil 
T    +41 41 758 1515
M    +41 79 208 7373
E    trevi@twanda.com 
www.twanda.ch
www.ipadweinkarte.twanda.ch

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe