Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • e-learning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Conocimientos
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Cervecería
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y soporte técnico
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Explorar todos los sectores
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Servicios para partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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

How do I use openERP with multiple domains on single server?

Suscribirse

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

Se marcó esta pregunta
v7
9 Respuestas
40019 Vistas
Avatar
Boyd Lynn Gerber

I have over 40 domains and I would like to have a specific database associated with each domain. Do I have to have multiple installs? I know how to use a specific database. But I cannot seem to control. I have tried having apache2 listen to specific 8069 ports for the domains. But I always seem to have issues.

I use apache2 named services. I have in /etc/apache2/vhosts a file

name-vitrual-host.XXX.XXX.XXX.XX9.80.conf
name-vitrual-host-XXX.XXX.XXX.XX2.80.conf
name-vitrual-host-XXX.XXX.XXX.XX9.443.conf
name-vitrual-host-XXX.XXX.XXX.XX2.443.conf

with

name-vitrual-host-XXX.XXX.XXX.XX9.8069.conf
name-vitrual-host-XXX.XXX.XXX.XX2.8069.conf

or name-vitrual-host-XXX.XXX.XXX.XX9.8069.conf.org name-vitrual-host-XXX.XXX.XXX.XX2.8069.conf.org

I have apache2 setup to only read and use a .conf So I am doing it with and without I have also tried using in my /srv/apache2/listen.conf a global *:8069

The above file has a different location for each openerp config in a domain. I have linked the source code from /usr/share/openerp to each domain.

cd /srv/www/vhosts/domain_name/
ln -s /usr/share/openerp openerp
cd /srv/www/vhosts/domain_name/
ln -s /usr/share/openerp openerp
...
cd /srv/www/vhosts/domain_name#/
ln -s /usr/share/openerp openerp

I have in each index.html or apporiate html file

Note each below have a http: in front //www.sample.com:8069/?db=openerp //www.sample1.com:8069/?db=openerp1 //www.sample2.com:8069/?db=openerp2 //www.sample3.com:8069/?db=openerp3

It is getting the openerp working. Seems openERP wants to bind to the IP:Port and not the domainname:Port

Been trying to get customized config files working. What I do for other programs is for example put the source in /usr/share/openerp with links in all the virtual hosts as shown above.

Each .conf file has the following in them [options] addons_path = /usr/share/openerp/addons or /srv/www/vhosts/domain_name/addons

then a specific db db_name=openerp db_name=openerp1 db_name=openerp2 db_name=openerp3

all have the same db_user = openerp

My problem is I get post already in use. I do the following:

/location_domain/openerp/openerp-server -c /location_domain/openerp.cfg &

Then on the next add using the -c with a different cfg and location I get the already in use. I have different names in the config file but they are using the same IP. Making use of the apache2 named configurations. So if the system uses the name it should work, but if using IP it will fail

Any known way to do this?

14
Avatar
Descartar
Avatar
Olivier Dony (odo)
Mejor respuesta

You can perfectly well serve all the databases with a single OpenERP server on your machine. Unfortunately you did not mention what error you were seeing and what you expected as a result - makes it a bit harder to help you ;-)

Anyway, here are some random ideas based on the information you provided:

  • If you have a problem with OpenERP not listening on all interfaces, try to specify 0.0.0.0 as the xmlrpc_interface in the configuration file, this should have OpenERP listen on 8069 on all IPs.
  • Note that Apache is not relevant if you're connecting to e.g. http://www.sample.com:8069/?db=openerp because you're directly connecting to OpenERP. If you want to go through Apache, you need to setup ReverseProxy rules in your vhost configs, and OpenERP does not need to listen to all public IPs then.
  • OpenERP 6.1 and later can autodetect the database name based on the virtual host name, and filter the name of the available databases: you need to start it with the --db-filter parameter, which represents a pattern used to filter the list of available databases. %h represents the domain name and %d is the first domain component of that domain. So for example with --db-filter=^%d$ I will only see the test database if I end up on the server using http://test.example.com:8069. If there's only one database match, the list is not displayed and the user will directly end up on the right database. This works even behind Apache reverse proxies if you make sure that OpenERP see the external hostname, i.e. by setting a X-Forwarded-Host header in your Apache proxy config and enabling the --proxy mode of OpenERP.

Update: The port reuse problem comes because you are trying to start multiple OpenERP servers on the same interface/port combination. This is simply not possible unless you are careful to start just one server per IP with the IP set in the xmlrpc_interface parameter, and I don't think you need that. The named-based virtual hosts that Apache supports are all handled by a single master process that listens on port 80 on all the interfaces. If you want to do the same with OpenERP you only need to start one OpenERP server for all your domains, and make it listen on 0.0.0.0, port 8069, as I explained above.
On top of that it's not clear what you would have set differently in the various config files. Running 40 different OpenERP servers on the same machine with identical code sounds like a lot of overkill. OpenERP is designed to be multi-tenant so that many (read: hundreds) of databases can be served from the same server.

12
Avatar
Descartar
Boyd Lynn Gerber
Autor

My problem is I get post already in use. I do the following. /location_domain/openerp/openerp-server -c /location_domain/openerp.cfg &

Boyd Lynn Gerber
Autor

Then on the next add using the -c with a different cfg and location I get the already in use. I have different names in the config file but they are using the same IP. Making use of the apache2 named configurations. So if the system uses the name it should work, but if using IP it will fail as i

Olivier Dony (odo)

Thanks for the extra info, I updated my answer

Luis Leiva

Important note on using --db-filter=^%d$ Database names ARE case sensitive while URL is NOT case sensitive, so if you have uppercases on database names the --db-filter=^%d$ will not work as URL converts everything to lower cases. Conclusion: use only lowercases in database names to use this.

bino oetomo

Hi Oliver and All

I create 2 db : db1 and db2

I also have hostname setup on my dns server ; db1.erp.bno db2.erp.bno

and in my /etc/openerp/openerp-server.conf , I put :

  1. list_db = False To disable the DB choice list, and
  2. db_filter=^%d$ In hope that web UI will select the db in regards of hostname (first part of FQDN)

But both didn't work 1. when I try to open http://db2.erp.bno:8069 , web UI forwardme to http://db2.erp.bno:8069/?db=db1 2. the DB choice list still there.

My installation is in ubuntu using apt-get

Kindly please give me your enlighten

Sincerely -bino-

Michael Karrer

Same for me db_filter seems to be not working on OpenERP Version 7

Michael Karrer

db-filter is working if i use it as a startup command for the server BUT is not working if i use it in the server config file ?!?

FRACHT FWO CZECH

Olivier, thanks for the explanation. I believe that the --proxy setting is in fact called --proxy-mode? I see a problem with the --db-filter setting: we have to make database names always be exactly the same like subdomains - this might be for whatever reason not always possible and it would be much better to have some way of mapping subdomains to arbitrary db names, this could be achieved e.g. with an Apache environment variable. Is there any possibility of creating such a mapping (without patching the OE7 code?). Also it would be great to have this kind of configuration available via web.

FRACHT FWO CZECH

Yes, we could add a mod_rewrite rule to add / replace the query string on every request, but I do not know if this will work with every request that OE7 generates... so fixing this in config file would be the best way.

FRACHT FWO CZECH

Another problem with this approach: if %h is the domain name, like e.g. http://example.com - this can not be a PostgreSQL database name, as the dot is an illegal character. So it is not possible to use a dbfilter like e.g. %h_%d because it would result in example.com_subdomain - you can not add such a database via the database creation dialog.

www postgresql org / docs / current / interactive / sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS (can not post links)

Avatar
Abner Galeno Jr.
Mejor respuesta

I have no idea yet how XML-RPC works, but it might be the answer you are looking for.

References:

https://accounts.openerp.com/forum/Help-1/question/336/ https://accounts.openerp.com/forum/Help-1/question/915/ https://accounts.openerp.com/forum/Help-1/question/429/ I would say doing multiple installs would be one hell of a installation+maintenance job.

2
Avatar
Descartar
Avatar
test
Mejor respuesta

Configure

I have try this and its working well.

http://tinyurl.com/oe-multi-domain-easy-config

This one of easy to setup.

0
Avatar
Descartar
Patrice Gaillard

This one sounds great. How did you apply this patch ? I don't get it...

Avatar
Lucio
Mejor respuesta

I think you can do the trick by launching different servers using the -c option when launching them.

With that option you can specify which configuration your server will use, in particular, which port to 'hear'.

For example, I am not sure but I think the default values in server.conf will be:

netrpc_port = 8070
...
smtp_port = 25
...
xmlrpc_port = 8069
...
xmlrpcs_port = 8071

By changing those you could specify which ports you want to use in every server process.

Hope it helps you!

-1
Avatar
Descartar
Boyd Lynn Gerber
Autor

Thanks, I should have been more explicit about what I have tried. Each doman has a config file with its database. My Problem is because I am using named services. I had over 750 public IP's but when my local phone company added Fiber their old DSL stopped working reliably. So Now I have to pay.

Boyd Lynn Gerber
Autor

Problem is I now only have 5 public IP addresses. I am able to come in to any domain and not have a problem. Seem openERP does not like to share IP addresses and wants to bind to the IP rather than the name. Thanks

Avatar
Boyd Lynn Gerber
Autor Mejor respuesta

Sovled by using *:8069 in /etc/apache2/listen.conf Then adding to each domain where desire

www.sample.com:8069/?db=openerp having a unique db for each domain.

Having a goood generic config and uses and using it with the -c config.cfg file.

-1
Avatar
Descartar
Olivier Dony (odo)

This makes no sense, why force Apache to listen to port 8069? If you're making Apache proxy requests to OpenERP, why don't you do it on the normal port (80/443)? Then just direct your customers to their own URL. So far it looks like you're just testing random things without trying to understand :-/

Avatar
Prosper G. Nitcheu
Mejor respuesta

Have you tried apache "VirtualHost" configuration ?

-1
Avatar
Descartar
Boyd Lynn Gerber
Autor

Yes, I have that part working for the domains . It is getting the openerp working. Been trying to get customized config files working. What I do for other programs is put the source in /usr/share/openerp with links in all the virtual hosts. name-vitrual-host-168.103.176.49.8069.conf domains

Avatar
sepdau
Mejor respuesta

Why don't use specific_url_db option. It must be easiest way to do this job.

specific_url_db=abc.com:sr4,cde.com:sr2

Use add this option in openerp-server config file

-1
Avatar
Descartar
Felipe

I tried this in v8 with no result. specific_url_db=database1.mydomain.com.co:DatabaseName1,database2.mydomain.com.co:DatabaseName2

Avatar
Luis Leiva
Mejor respuesta

Have you tried by redirecting subdomains to this: http://server:8069/?db=database

Almost works. For some thing I don't understand it seems to not recognize the database when redirected, but if you refresh the page with that URL the it does works fine.

Try it and tell me how it goes.

-1
Avatar
Descartar
Boyd Lynn Gerber
Autor

That is what I am doing. http://www.sample.com:8069/?db=openerp and so one for each domain and its database. The apache part is working. But the openERP with each having their own conig is not.

Avatar
Supreeth KV
Mejor respuesta

hello can you please provide me all step of installing multiple instances of openerp

-1
Avatar
Descartar
Supreeth KV

Please read bugs . launchpad . net /openobject-server/+bug/1195341

¿Le interesa esta conversación? ¡Participe en ella!

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

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
How to add a "Delete" button on the popup form? Resuelto
v7
Avatar
Avatar
1
oct 25
5799
Minimum Lot Charge For Sales Order Line Items
v7
Avatar
0
dic 24
10627
Record Rule to allow a User to update their own Employee object without belonging to Officer group Resuelto
v7
Avatar
Avatar
Avatar
Avatar
3
sept 24
23168
How to activate the Technical Features? Resuelto
v7
Avatar
Avatar
Avatar
Avatar
Avatar
5
dic 24
55436
Way to only allow a specific DB to be the default? Resuelto
v7
Avatar
Avatar
Avatar
Avatar
Avatar
4
jul 24
11986
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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