Skip to Content
Menu
This question has been flagged
3 Replies
16315 Views

I have installed the OCA module Multi Website Theme, but have some difficulties to configure my setting for a V10 community version installation on Ubuntu with nginx. What I could achieve is the following configuration.
Link to OCA module: https://github.com/OCA/website/tree/10.0/website_multi_theme

Just discovered this OCA module, will check it out: https://www.odoo.com/apps/modules/10.0/dbfilter_from_header


server.conf

dbfilter=mydatabase

nginx conf

## Redirection
server {
listen 80;
server_name myotherurl.org;
return 301 $scheme://myurl.org$request_uri;
}

Avatar
Discard
Author

sorry there are some issues with URL formatting in this post

Best Answer

You do need the module dbfilter_from_header in order to set up multi website theme properly. My configuration:

- odoo.conf: disable dbfilter, add dbfilter_from_header as a serverwide module

- proxy virtual host definition (in my example it is my caddyfile for the Caddy Webserver, but you can easily adapt it by adding the request header X-Odoo-dbfilter for your use case):

mydomain1.ch, www.mydomain1.ch {
  proxy / http://192.168.xxx.xxx:8069 { # Fill in the correct port..
    transparent
    header_upstream X-Odoo-dbfilter mydatabase
    }

  gzip
  log /var/log/caddy/mydomain1.access.log
  errors /var/log/caddy/mydomain1.error.log

}
 
mydomain2.ch, www.mydomain2.ch {
  proxy / http://192.168.xxx.xxx:8069 { # Fill in the correct port..
    transparent
    header_upstream X-Odoo-dbfilter mydatabase
    }

  gzip
  log /var/log/caddy/mydomain2.access.log
  errors /var/log/caddy/mydomain2.error.log

}
Avatar
Discard
Author Best Answer

What is also working now is a configuration with to separate nginx conf files without dbfilter_from_header.
But this works only with one database. For multi DB and multi website you need
dbfilter_from_header.

server.conf

dbfilter=mydatabase


Avatar
Discard

Ok, in my case I have multiple databases per instance, so this is why I use dbfilter_from_header.

Related Posts Replies Views Activity
4
Dec 21
19303
3
Apr 20
3385
0
Sep 18
5357
2
May 24
1638
1
Jan 23
4119