Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Odoo dbfilter in conf file

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
databasedbfiltermulti-website
4 Risposte
22737 Visualizzazioni
Avatar
Talmid

I have in my conf file:

dbfilter=^%d$

which works perfectly fine, it uses different databases based on the subdomain. Would it be possible to write an IF statement or a configuration where some subdomains use the same database? For example:

I want that site1.example.com use database site1

site2.example.com use database site2

and example.com use database site2.

Is it possible for some domains to have the same database? Or just use the multi-website module?

1
Avatar
Abbandona
Avatar
Alejandro Bello
Risposta migliore

Did you notice that you're trying to serve TWO different websites with just ONE same database? How's that even possible? And if feasible, why would you try to launch such a mess? What's the benefit in the end? Both would carry the exact same data and settings (hint: ONE DATABASE)

database2 with website1

database2 with website2

That's like sending TWO salespeople to two different cities, but both have to be riding in the same car, at the same time.

0
Avatar
Abbandona
Avatar
Ermin Trevisan
Risposta migliore

By default, this is not possible. There are 2 workarounds:

- with your dbfilter setting, "example.com" and "example.example.com" would both point to the database "example"

or

- you use the module "dbfilter_from_header" instead of the dbfilter parameter and then you specify the database for each hostname separately.

This has nothing to do with the multi-website module.

0
Avatar
Abbandona
Talmid
Autore

That is actually what I need, I tried using it, but somehow it didn't work as expected. I am trying to use also the multi website module. The error I am getting is that the URL is not correct.

So basically it would be that:

domain1. example.com having the database1

example.com having database2 with website1

domain2.example.com with database2 with website2

I want to have one database with two different websites. I am using Odoo 12 and it's behind an nginx reverse proxy, the config for the domain2 website is this:

# Odoo servers

upstream odoo {

server 192.168.100.10:8069;

}

upstream odoochat {

server 192.168.100.10:8072;

}

server {

listen 80;

server_name domain2.example.com;

include snippets/letsencrypt.conf;

return 301 https://domain2.example.com$request_uri;

}

server {

listen 80;

server_name example.com;

include snippets/letsencrypt.conf;

return 301 https://example.com$request_uri;

}

server {

listen 443 ssl http2;

server_name domain2.example.com example.com;

proxy_read_timeout 720s;

proxy_connect_timeout 720s;

proxy_send_timeout 720s;

# Proxy headers

proxy_set_header X-Forwarded-Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;

# proxy_set_header X-Odoo-dbfilter ^database2\Z;

# SSL parameters

ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;

ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem;

include snippets/ssl.conf;

# log files

access_log /var/log/nginx/odoo.access.log;

error_log /var/log/nginx/odoo.error.log;

# Handle longpoll requests

location /longpolling {

proxy_pass http://odoochat;

}

# Handle / requests

location / {

proxy_redirect off;

proxy_pass http://odoo;

}

# Cache static files

location ~* /web/static/ {

proxy_cache_valid 200 90m;

proxy_buffering on;

expires 864000;

proxy_pass http://odoo;

}

# Gzip

gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;

gzip on;

}

Another error is I added to the odoo.conf

server_wide_modules = "web, dbfilter_from_header"

but it says it doesn't exists, I have them copied in the addons folder of odoo with the owner odoo:odoo.

I appreciate your help.

Ermin Trevisan

The module is not ported to Odoo 12.0 yet.

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Bypass or Override for dbfilter for Admin or database manager?
database dbfilter
Avatar
1
ago 24
8068
How to configure a multi website /domain site Risolto
nginx dbfilter multi-website v10
Avatar
Avatar
3
ott 22
18663
How to set up sub-domain dbfilter
database subdomain odooV8 dbfilter
Avatar
Avatar
1
nov 15
10000
Database disappeared from list after activating Google Oauth for administrator
database
Avatar
0
lug 25
2284
Setup Odoo with specific database
database
Avatar
Avatar
2
nov 24
8485
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now