Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
11255 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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;

    }



Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
led 24
12972
1
zář 24
8192
3
čvc 25
8720
1
kvě 25
1020
2
zář 24
2339