콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
4412 화면

We have Odoo 12 (enterprise) on Ubuntu 18 running.


I want to force a database selection when a request comes from a certain domain (the webshop domain) 


So https://webshop.mydomain.com should only use the production "myproductiondb"


In /etc/odoo/odoo.conf I have set this:

server_wide_modules = base,web,dbfilter_from_header

proxy_mode = True


In Apache:

     ProxyRequests Off

     RequestHeader set X-Odoo-dbfilter "myproductiondb"


     #Redirect to ODOO

     ProxyPreserveHost On

     ProxyPass / http://localhost:8069/ retry=0

     ProxyPassReverse / http://localhost:8069/



However I still get redirected to webshop.mydomain.com/web/database/selector

If I add this in /etc/odoo/odoo.conf

dbfilter = myproductiondb

It works. But now it is always doing this, while I only want to force this on the webshop. So why is the RequestHeader functionality not working. 

Hope someone can help me

Thanks
아바타
취소
베스트 답변

Hi Jurn:

There may be a simpler way to do this by using %d in the dbfilter setting in odoo.conf

Take a look at the 2nd example provided here:

https://www.odoo.com/documentation/12.0/setup/deploy.html#configuration-samples

아바타
취소
베스트 답변

list_db = false ?

아바타
취소
베스트 답변

Hi Jurn,

Facing exactly the same issue on Odoo 13.

What was the solution to your problem?

Thanks,

Varinder

아바타
취소
작성자 베스트 답변

Hi Paresh, 

Thanks! However does this work if the database name is "myproductiondb" and the domain "webshop.mydomain.com" (so no relation in name)?
Or does this automatically work when the system parameter web.url is set to  in the database 
myproductiondb?


Thanks

아바타
취소

No. The name of the database should match the domain. You can duplicate and rename the database if you are still in the development phase. If you are already in production, you will need to assess the impact of changing the name of the database. For example, you may have backup scripts that have the database name hard coded in them.

관련 게시물 답글 화면 활동
1
3월 15
4816
1
8월 24
1138
1
3월 15
5932
3
7월 21
8308
5
8월 15
55518