Skip to Content
Menu
This question has been flagged
1 Reply
8103 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
</Directory>
</VirtualHost>

Avatar
Discard
Best Answer

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

https://www.odoo.com/documentation/8.0/setup/deploy.html

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

Avatar
Discard
Author

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?

I update the answer with how I do it with nginx

check this
http://www.nkr1ptd.com/2014/11/using-apache-with-odoo-8-and-ubuntu-1404.html

Author

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.

Related Posts Replies Views Activity
1
Aug 24
6026
3
Jan 24
6047
5
Jul 23
48225
4
Dec 21
19292
2
Aug 19
4578