Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
1448 Weergaven

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
Annuleer
Auteur Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 24
2759
2
mei 24
13929
1
jun. 20
5852
0
okt. 17
3173
2
jun. 16
13066