Configure domain-based database filters
NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:
$ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."
The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.
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 depending on your installation type:
Approach A: Bitnami installations using system packages
-
Edit the /opt/bitnami/odoo/conf/odoo.conf file and change these parameters:
db_name = False dbfilter = ^%d$ proxy_mode = True
-
Restart all the services:
$ sudo /opt/bitnami/ctlscript.sh restart
Approach B: Self-contained Bitnami installations
-
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