İçereği Atla
Menü
Bu soru işaretlendi

I need help configuring setting up Apache reverse proxy to redirecting Odoo 16 websocket request to Odoo gevent port. Odoo doc has the example config for nginx but I need it for Apache


# 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;
  }








Avatar
Vazgeç

I tested with success this github apache site example: https://gist.github.com/jbarreraballestas/cbe388d9b3b4697de5fc2164f28b4e73

"
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]
"

En İyi Yanıt

Just use NGINX haha

Avatar
Vazgeç
En İyi Yanıt

Can you share your Apache config file? please

Avatar
Vazgeç

Just solved with Ulises answer, i used https://gist.github.com/jbarreraballestas/cbe388d9b3b4697de5fc2164f28b4e73 but in this line

RewriteRule /(.*) ws://127.0.0.1:8069/$1 [P,L]

i used port 8072

RewriteRule /(.*) ws://127.0.0.1:8072/$1 [P,L]

En İyi Yanıt

I solved my problem:

    ProxyPass /websocket ws://127.0.0.1:8072/websocket

    ProxyPassReverse /websocket ws://127.0.0.1:8072/websocket

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Şub 25
2718
1
May 25
2123
1
Nis 25
3201
1
Nis 25
3993
1
Nis 25
1510