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

Setup Nginx for Subdomain

By
Paulo Matos‏
on 7/19/15, 1:06 PM 1,022 views

Hi all,

I am new to nginx and setup my server for reverse proxy my odoo instance.I am not using https for now since need to be familiar with nginx first before going to a higher level of setup.

Everything seems to be working fine. When I enter my subdomain name, I can see the login page for my Odoo instance and browser address bar shows my subdomain.

My problem is that, after log in with Google Chrome (and also with IE) browser bar shows the IP_address:port instead of subdomain. Testes with firefox and works fine. My script for nginx is (UPPER case replaced by subdomain and IP):

#worker_processes 1;

#events {

# worker_connections 1024;

#}

server {

listen 80;

server_name SUBDOMAIN.DOMAIN.CO;

location /socket.io {

proxy_pass http://SERVER_IP:8069;

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:8069;

}

}

Can anyone help me solve it?

Thank you very much

Paulo

2

Axel Mendoza

--Axel Mendoza--
10238
| 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:31 PM

You need to do for location "/" the same that you are doing for the location "/socket.io" except for the http 1.1 part. Define location "/" as:


    location / {

        proxy_pass http://SERVER_IP:8069;

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;

    }



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:06 PM
Seen: 1022 times
Last updated: 7/19/15, 5:31 PM