Is it possible to filter database on single instance by defining server alias in apache configuration file?
I can achieve this by creating multiple sites configuration files and running multiple instance of opnerp server.
But I want that to be done by runnning single openerp instance. If anyone has idea regarding this will be appreciated.
If you are working on local machine you should edit /etc/hosts with something like this:
where foo and bar are the db names.
Your virtual host file should look like this:
ServerAlias *.localhost // Use this if you want dbfillter on subdomain
CustomLog /var/log/openerp/openerp-access.log combined
Allow from all
ProxyPass / http://localhost:8069/
ProxyPassReverse / http://localhost:8069/
After that write dbfilter = ^%d$ in your openerp/tools/config.py file. After that restart apache2 and openerp.
In case you are doing all this on VPS and you bough a domain from domian provider, then you dont need to edit/etc/hosts file.
You can read a blog post for more information : http://goo.gl/1Ub8sc
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
|Asked: 10/9/14, 7:10 AM|
|Seen: 8334 times|
|Last updated: 12/18/15, 1:11 AM|