Community mailing list archives

RE: Odoo using nginx reverse proxy

Rooms For (Hong Kong) Limited, Yoshi Tashiro
- 11/26/2014 03:54:56

Even though the mentioned case is using Apache, the info in this thread might help.


Yoshi Tashiro
Rooms For (Hong Kong) Limited
Phone: +852-3483-1950
Mobile: +852-6682-9005


From: INVITU []
Sent: Wednesday, November 26, 2014 4:03 AM
To: Community
Subject: Re: Odoo using nginx reverse proxy


you can do it with one proxy, one odoo instance, one db instance :




Computer & Network Engineering

BP 32 - 98713 Papeete - French Polynesia

Tél: +689 40 46 11 99

P Please consider the environment before printing this e-mail!

Le 25/11/2014 07:52, Houssine BAKKALI a écrit :

<blockquote cite="" type="cite">

yes, odoo each server instance should have it's own postgres user...


2014-11-25 16:23 GMT+01:00 Melvin Miguel Martinez <>:

thanks Jos,


The configuration file would odoo-server.conf this:


list_db = False

db_filter = 'db1'



would have to create a new user look at the other database, because even point to another port, if I use the same user I can see the other database, right?


hope its recommendations, thanks in advance


2014-11-25 9:53 GMT-04:00 Jos De Graeve <>:


In such cases i just run one odoo server in 'single database' mode behind nginx, and a second odoo server on a different port number without the single DB mode.

That way you can have your production system behind nginx running your website, and a second instance for testing / staging etc.



Jos De Graeve - Apertoso business ICT



Guido Gezellelaan 16 - B-9800 Deinze - Belgium


mail/im/skype: - apertoso


2014-11-25 14:27 GMT+01:00 Melvin Miguel Martinez <>:


I am using Odoo v8 on a vps using nginx reverse proxy which points to a domain with your ssl certificate, and I have several database running which one would like to be the default. Ejm.


if I have a domain name and 2 db1 and db2 database data, assuming the db1 is the main, if point to routed me, and what I want is I routed to the homepage of db1 because in this I have my website, as I can accomplish this?


This is the server that I use block


upstream oddo {




server {

    listen      443 default;



    access_log  /var/log/nginx/oddo.access.log;

    error_log   /var/log/nginx/oddo.error.log;


    ssl on;

    ssl_certificate     /etc/nginx/ssl/server.crt;

    ssl_certificate_key /etc/nginx/ssl/server.key;

    keepalive_timeout   60;


    ssl_ciphers             HIGH:!ADH:!MD5;

    ssl_protocols           SSLv3 TLSv1;

    ssl_prefer_server_ciphers on;


    proxy_buffers 16 64k;

    proxy_buffer_size 128k;


    location / {

        proxy_pass  http://oddo;

        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;

        proxy_redirect off;


        proxy_set_header    Host            $host;

        proxy_set_header    X-Real-IP       $remote_addr;

        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header    X-Forwarded-Proto https;



    location ~* /web/static/ {

        proxy_cache_valid 200 60m;

        proxy_buffering on;

        expires 864000;

        proxy_pass http://oddo;




server {

    listen      80;



    add_header Strict-Transport-Security max-age=2592000;

    rewrite ^/.*$ https://$host$request_uri? permanent;


Post to:


Post to:


Post to:


Post to:


Post to: