所以我刚刚在我的 Ubuntu 服务器中安装了 Odoo 16 CE 版本。我已经配置了 nginx 和 odoo.conf,但是实时聊天不起作用。
然后我测试讨论应用程序。我有 2 个用户并使用 2 个浏览器。浏览器 A 使用用户 A,浏览器 B 使用用户 B。但聊天不是实时的。我必须刷新页面才能显示聊天内容。然后我尝试使用 8072 端口(domain.com:8072)访问我的服务器,这是实时聊天的端口,并且它有效。
为什么会这样?
这是我的 Nginx 配置
#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
server_name portoko.com;
# Add Content-Security-Policy header
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
Redirect websocket requests to odoo gevent port
location /websocket{
proxy_pass http://odoochat/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
Add Headers for odoo proxy mode
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_pass http://odoo/;
}
common gzip
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 500M;
sendfile on;
send_timeout 600s;
keepalive_timeout 300;
这是我的odoo.conf
admin_passwd = -
db_host = localhost
db_name = False
db_password = -
db_port = 5432
db_sslmode = prefer
db_template = template0
db_user = limomoli
dbfilter = %h$
list_db = False
http_port = 8069
logfile = /var/log/-/odoo.log
addons_path=/limomoli/odoo/addons,/odoo/custom/addons
proxy mode = True
workers = 15
limit_memory_hard = 15360000000
limit_memory_soft = 12288000000
max_cron_threads = 2
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
log_level = debug_rpc
longpolling_port = 8072
xmlrpc_port = 8069
你们能帮我吗?谢谢你
你找到解决办法了吗?我在 Odoo 16 CE 上面临同样的问题。有几乎相同的配置。尝试不同的“谷歌搜索”解决方案但没有成功