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

Multisite Single DB with Multi Domains pointing to 2 Different Websites Not Working When Not Signed In.

Iscriviti

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

La domanda è stata contrassegnata
accesswebsite_builderwebsitemultisiteWebsite
2 Risposte
5717 Visualizzazioni
Avatar
JD

Hi Everyone,


JD here, I'm a noob to odoo and I am evaluating the community edition for use with a few clients this year. It is a great platform and am looking forward to developing on it! Right now I am evaluating its limitations on multisite installations and ran into an issue I hope someone can help with quickly!


I saw the multisite feature was rather new and all seems well done on the backend but I am having a little bit of trouble on the frontend. 


The Problem:

domain1 shows website1 (all works as expected for domain1)

domain2 shows website1 when user is not logged in on domain2

domain2 shows website2 when user is logged in on domain2


When navigating the websites as an admin, the correct site and domain is shown when using the website switcher. If you manually enter the domain it will show you the correct website if the user is logged in. This is the behavior that makes me suspect that there is an odoo config I am missing. 

However, it may very well be that the issue has to do with my apache config rather than odoo but I thought if I missed something glaringly obvious someone may notice quickly and lend a hand!


The Setup:

The stack is running through Bitnami GCloud instance. 

I setup two companies each with its own website on its own domain. Each site has a homepage "/", a  custom page unique to each website, and a shared contact page.


 To manage the multiple domains through apache I 

  • Added VirtualHost (for ports 80 and 443) server and alias blocks to the recommended vhosts file for each of the domains

  • Setup the corresponding SSL certificates per domain via let's encrypt

  • Added an A record pointing both domains to the odoo instance IPv4. 

  • TESTED rerouting www to non and vice versa via apache and did not see a change in behavior

  • TESTED adding an X-ODOO_DBFILTER header with no change (expected behavior since only one db is present)

  • TESTED forwarding "fw=2" query string along with the response headers through apache rewrite to see if it forced selection of the data-website-id="2" ; result was that in the Network record I saw that the fw=2 was forwarded to fw=1 which I am unsure as to why and renders the incorrect website.


In the backend of oDoo I :

  • Added the domains to the website config and the language preference.

  • Assigned separate companies to each website

  • TESTED setting up users restricted to each domain and they worked as expected even though the incorrect website view was shown. ie. if User1 has access to Website1 on Domain1 then he could enter, if he had access to Domain2 only then the login on Domain1 did not work. 

  • TESTED: adding the https:// prefix and www. prefix to both and to only one or the other. no change in behavior on the frontend, still showed website1

  • I am not planning on using nor did I test the GeoIp for determining site selection.

When in inspecting the network requests for domain1 and domain2 I see that both pages first document request forwards on a query string of "fw=1" which appears to allow for site selection via a parameter as a backup to the identification of the domain through the request headers. Am I correct here?


On the frontend, when the user is not logged in I see that the fw=1 is always requested with the index of either domain. If  we use the "?fw=2" parameter on domain1 it will show website2 as expected if the user is logged in, but if he is not then the request is forwarded to "?fw=1".

In the HTML page source the html attribute contains the property data-website-id="1" regardless of the the domain the user visits when he is NOT logged in, however when an authorized user is logged in the html element shows  data-website-id="2" and displays website2 as expected.

It appears that I should be able to control which website view is rendered by passing a website-id along with the server request but outside of the "?fw=" parameter I a not sure how to do that.


Any help would be greatly appreciated and i hope everyone has a safe new year!
JD

0
Avatar
Abbandona
zahid

I have the same problem : one database, multicompany, two domaines
nothing i tried worked.
Does someone figured it out yet ?

Avatar
Sébastien CLAUDE
Risposta migliore

Hello did you solve this problem?

1
Avatar
Abbandona
Avatar
Hamid karampour
Risposta migliore

check ur nginx to set this header :

proxy_set_header Host $host;
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;

0
Avatar
Abbandona
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à
Website Editor iframe requesting http, not loading, with AWS ALB
website_builder website Website
Avatar
Avatar
2
ott 25
871
How do i re-run the website builder to include the demo theme? Risolto
website_builder website
Avatar
Avatar
Avatar
2
set 25
4443
Adding an HTML element to existing website template
website_builder website
Avatar
Avatar
1
lug 25
1859
How to add lottie animation to odoo site
website_builder website
Avatar
Avatar
Avatar
2
giu 25
3325
Website - how to ask for email before allowing download of a pdf Risolto
website_builder website
Avatar
Avatar
Avatar
3
apr 25
3277
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