Hello there !
First of all, I'm kind of new to virtual hosts and redirecting urls.
I am trying to setup apache to redirect a subdomain to a matching openerp database on my server. Example: http://foo.mydomain.com will call the database foo.
I'm testing with localhost, so I edited /etc/hosts with something like this:
127.0.0.1 foo.localhost 127.0.0.1 bar.localhost
Here is my virtual host declaration in /etc/apache2/sites-available/openerp.conf:
<VirtualHost *:80> ServerName localhost ServerAlias *.localhost // Use this if you want dbfillter on subdomain ErrorLog /var/log/openerp/openerp-error.log CustomLog /var/log/openerp/openerp-access.log combined <Proxy *> Order deny,allow Allow from all </Proxy> ProxyRequests Off ProxyPass / http://localhost:8069/ ProxyPassReverse / http://localhost:8069/ ProxyVia On LogLevel warn </VirtualHost>
After that, I wrote dbfilter = ^%d$ in my openerp.conf file. After apache2 and openerp were restarted, I started testing it.
The thing is, the first time I try to reach a new database, I have to explicitely write http://database-name.localhost?db=name-of-the-new-db. After the first login/logout, I just have to type http://database-name.localhost, as expected. I'm not sure if I have to do it on all computers (no tested yet) but it's kinda weird I think.
Is it part of openrp mechanism to bound a subdomain to a database, or just a bug, or something I've done wrong ?
Thanks
(my edit was a clarification one)
No one ?