İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
2262 Görünümler

Hello, I am installing Odoo 16 on Debian 10. I am studying the IoT configuration case, and for this I configured the proxy with nginx and I have it up and running. But when I ask for the hash with the URL I see that it gives me a URL such as http://127.0.0.1:8069/io/***/configure. I have tried entering with the URL http://192.168.1.*:8069/io/***/configure and it redirects me to https://192.168.1.*:8069/io/***/configure but it marks the error Method not allowed. I have also tried it with a domain and the server responds well, but if I go to http://domain/io/***/configure or https://domain/io/***/configure. It marks the error 405 Method not allowed.




If I go to nginx errors with odoo this appears: 2024/09/06 20:30:50 [error] 5773#5773: *2 connect() failed (111: Connection refused) while connecting to upstream, client: IP-PUBLIC , server: domain-generic.org, request: "GET /web HTTP/2.0", upstream: "http://127.0.0.1:8069/web", host: "domain-generic.org"

Avatar
Vazgeç
Üretici En İyi Yanıt

Hi, I just did it and it works, but not everything. Now I get these errors:


connect() failed (111: Connection refused) while connecting to upstream, client: 8**.**.**.***, server: bit ****.dns.org, request: "GET /websocket HTTP/1.1", upstream: "http://127.0.0.1:8072/websocket", host: "www.bit***.dns.org"

root@bi:/var/log/nginx#

Another error when i trie to acces


"GET /websocket HTTP/1.1" 502 575


I needed to change /etc/hosts form : #127.0.0.1 localhost to 

127.0.0.1 bit****.dns.org

Becouse i need to get a certificate with certbot.

My configuration in nginx is 


# Odoo Upstreams

upstream odooserver {

    server 127.0.0.1:8069;

}

upstream odoochat {

server  127.0.0.1:8072;

}

map $http_upgrade $connection_upgrade {

default upgrade;

'' close;

}

location /websocket {

proxy_redirect off;

proxy_read_timeout 720s;

proxy_connect_timeout 720s;

proxy_send_timeout 720s;

# Add Headers for odoo proxy mode

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;

#added 95-a 98

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "Upgrade";

proxy_pass http://odoochat;

  }


Configuration in odoo.conf 


addons_path = /usr/lib/python3/dist-packages/odoo/addons, /home/odoo/custom

default_productivity_apps = True

logfile = /var/log/odoo/odoo.log

proxy_mode = True

;workers = 64

xmlrpc = True

xmlrpc_interface = 127.0.0.1

xmlrpc_port = 8069

xmlrpcs = True

xmlrpcs_interface = 127.0.0.1

xmlrpcs_port = 8072


Thanks

Avatar
Vazgeç
En İyi Yanıt

Hi,

Please check the Nginx configuration and proxy request to Odoo and refer to the blog below to double check the nginx configuration.

https://www.cybrosys.com/blog/how-to-configure-odoo-with-nginx-as-reverse-proxy


Hope it helps

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
May 24
3456
2
May 24
14751
1
Haz 20
6364
0
Eki 17
3527
2
Haz 16
13686