콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
11330 화면

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

아바타
취소
베스트 답변

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;

    }



아바타
취소
관련 게시물 답글 화면 활동
1
1월 24
13070
1
9월 24
8262
3
7월 25
8848
1
5월 25
1109
2
9월 24
2456