Community archivos de la lista de correo


Odoo using nginx reverse proxy

Melvin Martinez
- 25/11/2014 08:24:08
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;