Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

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

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
accesswebsite_builderwebsitemultisiteWebsite
2 Respuestas
5596 Vistas
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
Descartar
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
Mejor respuesta

Hello did you solve this problem?

1
Avatar
Descartar
Avatar
Hamid karampour
Mejor respuesta

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
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Website Editor iframe requesting http, not loading, with AWS ALB
website_builder website Website
Avatar
Avatar
2
oct 25
767
How do i re-run the website builder to include the demo theme? Resuelto
website_builder website
Avatar
Avatar
Avatar
2
sept 25
4233
Adding an HTML element to existing website template
website_builder website
Avatar
Avatar
1
jul 25
1698
How to add lottie animation to odoo site
website_builder website
Avatar
Avatar
Avatar
2
jun 25
3187
Website - how to ask for email before allowing download of a pdf Resuelto
website_builder website
Avatar
Avatar
Avatar
3
abr 25
3198
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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