跳至内容
菜单
此问题已终结
3 回复
17910 查看

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;
}

形象
丢弃
编写者

sorry there are some issues with URL formatting in this post

最佳答案

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

}
形象
丢弃
编写者 最佳答案

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


形象
丢弃

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

相关帖文 回复 查看 活动
4
12月 21
21392
3
4月 20
4855
0
9月 18
6433
2
5月 24
3572
1
1月 23
5410