Hi, as the title suggest, I have an Odoo 14.0 Community Edition setup behind reverse proxy. My scenario is quite simple, and everythign works, except odoo chat (both internal and external). I have:
- a 100mb/10mb line, with no static IP
- various VM on local network with many subdomains.
- Apache reverse proxy VM, with port 80 and 443 forwarded to it
- Openwrt router with DDNS service to update my IP to the service, and external DNS setted to have my domains point to my IP
-Odoo VM is in the local network, serving on port 8069. Local IP address is assigned by DHCP, and I don't care to have it static because apache reverseproxy in my setup is name based. So I just stick with the VM hostname in the apache config.
- /etc/odoo/odoo.conf has the line "Proxy Mode = True", 4 workers and 1 chron job on 4cpu vm
- at first created apache virtual server on port 80 (http) that points to my Odoo 14 VM. Odoo docs give example only for NGINX, so I will paste here my config:
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /longpolling/ http://host:8072/ retry=0
ProxyPassReverse /longpolling/ http://host:8072/ retry=0
ProxyPass / http://host:8069/ retry=0
ProxyPassReverse / http://host:8069/ retry=0
( change "http://host" with VM local hostname)
- after creating http entry that points to odoo vm, it's time to upgrade it to https: to do this i use Let's Encrypt. ssh to the proxy VM, and launch this command:
sudo certbot
The tool will asks you wich site you want to upgrade, and if you want a redirect, I choose YES.
- Now, on proxy VM you have to open and edit the new site's (port 443) config file. To do this I use webmin, but you can also use ssh and nano or vim. We need to add this line to avoid https redirecting loops:
RequestHeader set X-Forwarded-Proto "https"
After all that you can restart apache2 and odoo and https://yourdomain.com should work. At least, mine do.
But the internal chat has a weird behave, you can open it, write message, you can't see your message, but if you refresh the page, the written message finally appear
I will do another test disabling multithread support with workers=0, and see if that will do the trick but I still don't understand what I've done wrong. Any help would be appreciated, thank you very much.
EDIT: I've tried disabling workers, and longpolling proxy entry and it works! So it has to be something to do with longpolling port.
Chechek in the conf, 8072 is right, tried also with "host:8072/" and "host:8072/longpolling/" but no changes in behaviour. Longpolling doesn't work for me behind apache2
Have you figured out how to correct this behaviour?