تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
17730 أدوات العرض

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
ديسمبر 21
21155
3
أبريل 20
4710
0
سبتمبر 18
6307
2
مايو 24
3327
1
يناير 23
5242