2017-04-09 1 views
0

다른 링크에서 두 개의 Odoo v10 인스턴스를 실행하고 싶습니다. 1 인스턴스는이 링크 clients.mydomain.comNginx - 다른 하위 도메인 이름으로 Odoo의 여러 인스턴스를 실행하는 방법

에 그들을 위해 Odoo을 보여 우리의 고객을위한 데모 데이터베이스를 개최합니다이 링크 mydoamin.com

에서 실행 우리의 테스트 목적 그리고 두 번째 인스턴스에 대한 여러 데이터베이스가 포함됩니다

두 인스턴스가 모두 동일한 서버에서 실행되어야합니다. 나는이 접근법을 달성하는 방법을 이해하기 위해 많은 연구를했지만 Nginx 리버스 프록시를 사용하여 어떤 가이드가 도움이 될지 찾지 못했습니다.

upstream backend-odoo { 
    server 127.0.0.1:8069; 
} 
upstream backend-odoo-im { 
    server 127.0.0.1:8072; 
} 
server { 
    listen 80; 
    add_header Strict-Transport-Security max-age=2592000; 
    rewrite ^/.*$ https://example.com$request_uri? permanent; 
} 
server { 
    listen 443 default; 
    # ssl settings 
    ssl on; 
    ssl_certificate 
    /etc/nginx/ssl/cert.pem; 
    ssl_certificate_key /etc/nginx/ssl/key.pem; 
    keepalive_timeout 60; 

    #increase the upload file size limit 
    client_max_body_size 300M; 

    # proxy header and settings 
    proxy_set_header Host $host; 
    proxy_set_header X-Real-IP $remote_addr; 
    proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; 
    proxy_set_header X-Forwarded-Proto $scheme; 
    proxy_redirect off; 

    # odoo log files 
    access_log /var/log/nginx/odoo-access.log; 
    error_log /var/log/nginx/odoo-error.log; 
    # increase proxy buffer size 
    proxy_buffers 16 64k; 
    proxy_buffer_size 128k; 
    # force timeouts if the backend dies 
    proxy_next_upstream error timeout invalid_header http_500 
    http_502 http_503; 
    # enable data compression 
    gzip on; 
    gzip_min_length 1100; 
    gzip_buffers 4 32k; 
    gzip_types text/plain application/x-javascript text/xml text/css; 
    gzip_vary on; 

    location/{ 
     proxy_pass http://backend-odoo; 
    } 
    location ~* /web/static/ { 
    # cache static data 
    proxy_cache_valid 200 60m; 
    proxy_buffering on; 
    expires 864000; 
    proxy_pass http://backend-odoo; 
    } 
    location /longpolling { 
     proxy_pass http://backend-odoo-im; 
    } 
} 

PS :

여기 내 Nginx의 구성 파일입니다. odoo 설정 파일에 db filter = ^%d$을 설정하려고했지만 아무 것도 얻지 못했습니다.

답변

0

나를 더 잘 작동하는 dbfilter = %h$을 시도해보십시오. URL과 일치하는 데이터베이스의 이름을 바꾸어야합니다. yourdomain.com은 yourdomain_com을 DB 이름으로 가져옵니다.

관련 문제