This is a relatively old question, but for those who might end up here experiencing the same issue, I solved it adding the following to nginx:
proxy_set_header Host $http_host;
Also X-Forwarded-Host looks slightly different on mine:
proxy_set_header X-Forwarded-Host $http_host;
Same as Hicham Z, https://domain.com/web/login would load fine but after logging in, it would redirect to http://odoo/web
I didn't have this problem on Ubuntu 22.04 but I had it on Ubuntu 24.04. Maybe something to do with different versions of nginx or changes on the default settings