Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to set up sub-domain dbfilter

Cyrus Waithaka
on 11/28/15, 9:08 AM 856 views

I am trying to set up odoo v8 with dbfilter on subdomains. I have created two subdomains on my server. db1.mydomain.com and db2.mydomain.com. ( I am using virtual min to manage the subdomains). I have then added the line dbfilter = ^%d$ in my odoo configuration file. However, I cannot access any of the databases. What am I doing wrong? Here is my apache2 config file. Openerp.conf

<VirtualHost *:80>
ServerName mydomain.com
ServerAlias *mydomain.com
WSGIScriptAlias / /opt/odoo/openerp-wsgi.py
WSGIDaemonProcess oe user=odoo group=odoo processes=2 python-path=/opt/odoo/ display-name=apache-odoo
WSGIProcessGroup oe
ErrorLog /var/log/odoo/odoo-error.log
CustomLog /var/log/odoo/odoo-access.log combined
<Directory /opt/odoo>
#Order allow,deny
#Allow from all
Options All
AllowOverride All
Require all granted


Axel Mendoza

--Axel Mendoza--
| 6 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 11/28/15, 9:46 AM

You aren't doing anything wrong, you just need to setup more subdomains or a wildcard one for the rest of the dbs. If you are not seeing any database it's because you aren't sending the correct headers information so your virtualmin could act as reverse proxy for Odoo. Search for how to do deploy it here


for nginx I set this headers with their values:

 proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;

You need to find how to do it in virtualmin

Hi Axel. Thank you for the quick response. I only have two databases and each has a subdomain. However, if I visit the subdomains, I don't get any database. How can I ensure that correct header information is sent?

Cyrus Waithaka
on 11/28/15, 12:34 PM

I update the answer with how I do it with nginx

Axel Mendoza
on 11/28/15, 12:46 PM

check this

Axel Mendoza
on 11/29/15, 4:18 AM

After following everything in all the guides that I could find online, including that one, dbfilter just couldnt work on virtual min. It finally worked after trying several thing. Not sure what exactly was the issue. Here is a list of everything that I did. 1. In /openerp/tools/config.py, ensure line 185 rreads group.add_option("--db-filter", dest="dbfilter", my_default='.*', 2. I updated virtual min to the latest version. 3. I then changed PHP script execution mode run from the web server user in Server Configuration> Website Options "Apache mod_php (run as Apache's user)". I then restarted odoo and apache2 service. These steps somehow worked.

Cyrus Waithaka
on 12/1/15, 5:29 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 11/28/15, 9:08 AM
Seen: 856 times
Last updated: 11/28/15, 7:44 PM