Open icf20 opened 4 months ago
Thanks for the heads up on this.
Can you confirm that there is no additional config required to make Odoo work as expected after removing this config?
u need something like this for the websocket no? i am not sure
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:8069/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://127.0.0.1:8069/$1 [P,L]
Thanks for the hint & the link, plus bring this to my attention in the first place.
I've got my head pretty deep in something else ATM, but I'll have a closer look ASAP.
I think there is a misunderstanding here. The problem is not the websocket as this is native from any webserver (nginx or apache) the problem is the Directive that is being callend in the config file.
it used to be the longpolling directive now it is called gevent_port = 8072 this directive will be in transition until version 18 (as far as i know)
So what should be done actually (and as recomended a external reverse-proxy nginx by Odoo)
is to set a websocket location as in this example:
` server { listen 80; listen 443; server_name www.example.com; return 301 $scheme://example.com$request_uri; }
server { server_name example.com;
set $upstream 192.168.1.160;
#Odoo LongPolling COMMENT if not Odoo
location /longpolling {
proxy_pass http://$upstream:8072;
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 $scheme;
}
location /websocket {
proxy_pass http://$upstream:8072;
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 $scheme;
}
location / {
proxy_pass_header Authorization;
proxy_pass http://$upstream: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_http_version 1.1;
proxy_set_header Connection “”;
proxy_buffering off;
client_max_body_size 0;
proxy_read_timeout 36000s;
proxy_redirect off;
}
} `
I think this is not a issue from the odoo tkl app actually is an issue of the Reverse Proxy settings.
Any question i'm glad to help
this needs to be removed from apache2 config no?