Community mailing list archives

Re: Odoo using nginx reverse proxy

Apertoso, Jos De Graeve
- 11/25/2014 08:50:49

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
Direct: +32 9 381 64 51
General:+32 9 381 64 50
Mobile: +32 475 54 68 80
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: