Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Nginx with 2 Odoo Instances v7 and v8

By
Paulo Matos‏
on 7/19/15, 1:14 PM 1,080 views


Dear all,

I have 2 instances of Odoo running on the same server. One for v7 and other for v8.

I setup 2 subdomains for each instance. ODOOV7 for v7 (port 8069) instance and ODOOV8 for v8 (port: 8089) instance.

I am new to nginx and trying to setup nginx for reverse proxy both subdomains (one foreach instance).

The script I use for v8 instance (just for http proxy since not using at this moment https) - UPPER case replaced by domain name



#worker_processes 1; #events { # worker_connections 1024; #} server {      listen 80;     server_name ODOOV8.DOMAIN.COM;      location /socket.io {         proxy_pass http://SERVER_IP:8089;          proxy_http_version 1.1;          proxy_set_header Upgrade $http_upgrade;          proxy_set_header Connection "upgrade";          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;          proxy_redirect off;      }     location / {          proxy_pass http://SERVER_IP:8089;      } }

Can anyone help me change this code in order to reverse proxy both instances?

Thank you very much

Paulo

1

Axel Mendoza

--Axel Mendoza--
10203
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 7/19/15, 5:25 PM

You need to do something like this
 

    upstream odoov7 {
        server SERVER_IP:8069 weight=1 fail_timeout=300s;
    }
    upstream odoov8 {     server SERVER_IP:8089 weight=1 fail_timeout=300s;     }

server { listen 80; server_name ODOOV7.DOMAIN.COM; location /socket.io { proxy_pass http://odoov7$request_uri; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; 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; proxy_redirect off; } location / { proxy_pass http://odoov7$request_uri; } } server {
listen 80;
server_name ODOOV8.DOMAIN.COM;
location /socket.io {
proxy_pass http://odoov8$request_uri;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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;
proxy_redirect off;
}
location / {
proxy_pass http://odoov8$request_uri;
}
}

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 7/19/15, 1:14 PM
Seen: 1080 times
Last updated: 7/19/15, 5:26 PM