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

How to setup apache2 and openerp to match subdomains with databases ?

Suscribirse

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

Se marcó esta pregunta
virtualapachehost
8 Respuestas
12509 Vistas
Avatar
PY

Hello there !

First of all, I'm kind of new to virtual hosts and redirecting urls.

I am trying to setup apache to redirect a subdomain to a matching openerp database on my server. Example: http://foo.mydomain.com will call the database foo.

I'm testing with localhost, so I edited /etc/hosts with something like this:

127.0.0.1 foo.localhost
127.0.0.1 bar.localhost
    

Here is my virtual host declaration in /etc/apache2/sites-available/openerp.conf:

<VirtualHost *:80>
    ServerName localhost
    ServerAlias *.localhost // Use this if you want dbfillter on subdomain
    ErrorLog /var/log/openerp/openerp-error.log
    CustomLog /var/log/openerp/openerp-access.log combined
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyRequests Off
    ProxyPass / http://localhost:8069/
    ProxyPassReverse / http://localhost:8069/
    ProxyVia On
    LogLevel warn
</VirtualHost>

After that, I wrote dbfilter = ^%d$ in my openerp.conf file. After apache2 and openerp were restarted, I started testing it.

The thing is, the first time I try to reach a new database, I have to explicitely write http://database-name.localhost?db=name-of-the-new-db. After the first login/logout, I just have to type http://database-name.localhost, as expected. I'm not sure if I have to do it on all computers (no tested yet) but it's kinda weird I think.

Is it part of openrp mechanism to bound a subdomain to a database, or just a bug, or something I've done wrong ?

Thanks

(my edit was a clarification one)

No one ?

0
Avatar
Descartar
Avatar
swapnil wagh
Mejor respuesta

Check this for your answer https://www.odoo.com/forum/help-1/question/how-to-set-database-filter-on-sub-domain-for-odoo-website-using-apache-web-server-64935#answer-65100

7
Avatar
Descartar
PY
Autor

Thanks, I'll have a look at this !

PY
Autor

This is exactly what I have in my config files... But I still have to write subdomain.localhost/?db=subdomain the first time for each new database. The second time and later, I just need subdomain.localhost, and it will write the ?db= part itself.

Avatar
Carlton Guc
Mejor respuesta

Here is a complete write up of how we implement Apache to redirect urls to databases.

www.inlinetechnology.com/blog/howto-4/post/odoo-mapping-url-to-database-36

0
Avatar
Descartar
Avatar
Hengky Zhang
Mejor respuesta

maybe you can use port redirect in apache vhost instead of using your method

becoz i use port redirect for my case

maybe you can try my conf

<VirtualHost *:80>

ServerName mydomain.com

Redirect 8069 / http://mydomain.com:8069/

</VirtualHost>

0
Avatar
Descartar
PY
Autor

This is exactly what I'm doing, I think. But perhaps you can share your conf files ? :)

Hengky Zhang
servername a.b.com redeirect / http://a.b.com:8069
PY
Autor

I tried this way, but it's very tedious, as you'll have to create one virtual host entry for each subdomain.

¿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
Configuration odoo version 16.2 to 16 version
host
Avatar
0
may 23
3314
Use of web server (Apache, nginx) Resuelto
nginx apache
Avatar
Avatar
Avatar
2
may 24
8509
Can I host Odoo on my own server? Resuelto
own host
Avatar
Avatar
Avatar
2
jun 23
47958
Live Chat fails after SSL Cert installation
apache livechat
Avatar
1
ago 19
4491
Configuring htaccess with Odoo?
apache access_rules
Avatar
0
sept 15
6857
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.

Sitio web hecho con

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