Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
17778 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả

sorry there are some issues with URL formatting in this post

Câu trả lời hay nhất

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

}
Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 12 21
21215
3
thg 4 20
4747
0
thg 9 18
6336
2
thg 5 24
3439
1
thg 1 23
5293