Hello Everyone, may be it is not quite a setup topicStarter is interested in, but I managed to run two different databases (basically 2 different websites/CRMs) on port 80 on the same physical machine with 2 IPs.
After seaching how to force Odoo 8 rc1 working for 2 separate "instances" on the same Debian machine, I've came up with the folowing idea:
run 2 simultaneous odoo instances / 2 independent Postgres users (security reason) / Apache+mod_proxy
0) install odoo itself. create all the needed Postgress users:
su - postgres
createuser -d -l -P user_A
createuser -d -l -P user_B
1) copy the startup daemon script with: cp -rp /etc/init.d/odoo /etc/init.d/odoo_2
2) point second daemon to separate config file: vim /etc/init.d/odoo2
# diff /etc/init.d/odoo /etc/init.d/odoo_2
16,19c16,19
< NAME=odoo
< DESC=odoo
< CONFIG=/etc/odoo/openerp-server.conf
< LOGFILE=/var/log/odoo/odoo-server.log
---
> NAME=odoo_2
> DESC=odoo_2
> CONFIG=/etc/odoo/openerp-server_2.conf
> LOGFILE=/var/log/odoo/odoo-server_2.log
3) edit the configuration file for the second instance : vim /etc/odoo/openerp-server_2.conf
# diff /etc/odoo/openerp-server.conf /etc/odoo/openerp-server_2.conf
3c3
< admin_passwd = passwd_A
---
> admin_passwd = passwd_B
6,7c6,7
< db_user = user_A
< db_password = pass_A
---
> db_user = user_B
> db_password = pass_B
13c13
< xmlrpc_interface = IP_1
---
> xmlrpc_interface = IP_2
4) now you should be able to start and achieve two separate odoo instances on IP_1:8069 and IP_2:8069 by running:
service start odoo and service start odoo2
5) in order to access them on convinent port 80 it is needed to tune Apache.
sudo a2enmod proxy_http headers rewrite
6) vim /etc/apache2/sites-enabled/my_main
<VirtualHost IP_1:80>
ServerName FQDN_1
ErrorLog /var/log/apache2/httpd-error-fqdn1.log
CustomLog /var/log/apache2/httpd-error-fqdn1.log combined
<Proxy IP_1>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass / http://FQDN_1:8069/
ProxyPassReverse / http://FQDN_1:8069/
ProxyVia On
LogLevel warn
</VirtualHost>
<VirtualHost IP_2:80>
ServerName FQDN_2
ErrorLog /var/log/apache2/httpd-error-fqdn2.log
CustomLog /var/log/apache2/httpd-error-fqdn2.log combined
<Proxy IP_2>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass / http://IP_2:8069/
ProxyPassReverse / http://IP_2:8069/
ProxyVia On
LogLevel warn
</VirtualHost>
P.S. I know, that it is not the most elegant solution, but it allows to avoid displaying 'select DB' page, provides some additional security and some redundancy. And you can shutdown one instance when needed. + with the "NameVirtualHost IP_n:80" directive in apache config you can bind additional virtual host to IP_n:80
Useful? Vote! =)