Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

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

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
accesswebsite_builderwebsitemultisiteWebsite
2 Răspunsuri
5680 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
zahid

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

Imagine profil
Sébastien CLAUDE
Cel mai bun răspuns

Hello did you solve this problem?

1
Imagine profil
Abandonează
Imagine profil
Hamid karampour
Cel mai bun răspuns

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
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Website Editor iframe requesting http, not loading, with AWS ALB
website_builder website Website
Imagine profil
Imagine profil
2
oct. 25
836
How do i re-run the website builder to include the demo theme? Rezolvat
website_builder website
Imagine profil
Imagine profil
Imagine profil
2
sept. 25
4372
Adding an HTML element to existing website template
website_builder website
Imagine profil
Imagine profil
1
iul. 25
1794
How to add lottie animation to odoo site
website_builder website
Imagine profil
Imagine profil
Imagine profil
2
iun. 25
3278
Website - how to ask for email before allowing download of a pdf Rezolvat
website_builder website
Imagine profil
Imagine profil
Imagine profil
3
apr. 25
3249
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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