vmwareodoo

Configure domain-based database filters

Odoo can be configured to use sub-domain filtering so the users can run different Odoo databases on different sub-domains. This means you can have different Odoo websites/applications for different uses.

To configure this, follow the next steps:

Odoo 10.x or higher

  • Edit the /opt/bitnami/apps/odoo/conf/odoo-server.conf file and change these parameters:

    db_name = False
    dbfilter = ^%d$
    proxy_mode = True
    
  • Edit the /opt/bitnami/apps/odoo/scripts/odoo_background_worker.sh file and configure as shown below:

    SCHEDULER_START="$ODOO_HOME/bin/odoo-bin -c $ODOO_HOME/conf/odoo-server.conf --max-cron-thread 1 --db-filter=^%d$"
    
  • Edit the /opt/bitnami/apps/odoo/scripts/odoo_gevent.sh file and add the following values:

    GEVENT_START="$ODOO_HOME/bin/odoo-bin gevent -c $ODOO_HOME/conf/odoo-server.conf --max-cron-thread 0 --db-filter=^%d$"
    
  • Add the following lines at the bottom of the /opt/bitnami/apps/odoo/conf/httpd-app.conf file:

    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>
    ProxyRequests Off
    
  • Restart all the services:

    $ sudo /opt/bitnami/ctlscript.sh restart
    

Odoo 9.x or earlier

  • Edit the /opt/bitnami/apps/odoo/conf/openerp-server.conf file and change these parameters:

    db_name = False
    dbfilter = ^%d$
    proxy_mode = True
    
  • Edit the /opt/bitnami/apps/odoo/scripts/openerp_background_worker.sh file and configure as shown below:

    SCHEDULER_START="$OPENERP_HOME/bin/openerp-server -c $OPENERP_HOME/conf/openerp-server.conf --max-cron-thread 1 --db-filter=^%d$"
    
  • Edit the /opt/bitnami/apps/odoo/scripts/openerp_gevent.sh file and add the following values:

    GEVENT_START="$OPENERP_HOME/bin/openerp-gevent -c $OPENERP_HOME/conf/openerp-server.conf --max-cron-thread 0 --db-filter=^%d$"
    
  • Add the following lines at the bottom of the /opt/bitnami/apps/odoo/conf/httpd-app.conf file:

    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>
    ProxyRequests Off
    
  • Restart all the services:

    $ sudo /opt/bitnami/ctlscript.sh restart
    
Last modification September 4, 2018