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

Hi Oders,


I just installed Odoo 16 EE on my server, but after login, the system redirect to a wrong url, as: http://odoo/web instead of http://domain.com/web, and I have to manually put the correct address to display my admin page.

How to fixe it please

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
Üretici En İyi Yanıt

Thank you so much for your quick response!

However, I don't installed this module yet, and this is not for users' website.

I get the wrong url when I try to login to Odoo administration panel as an administrator user.

Is it the same?

Avatar
Vazgeç

Did you configured/used reverse proxy like Nginx ? If yes, see the nginx configuration, most likely the issue is related to Nginx and also check the web.base.url configured in the system parameters

Üretici

Yes, I get this issue just after configuring NGINX, as following:

#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}

server {
listen 80;
server_name mydomain.com;

proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;

access_log /var/log/nginx/odoo_access.log;
error_log /var/log/nginx/odoo_error.log;

location / {
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;

proxy_redirect off;
proxy_pass http://odoo;
}

location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
}

gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}

En İyi Yanıt

Hello Hicham,

You can specify in which url you want to redirect after login. This can be added in the domain field under website settings


Regards

Avatar
Vazgeç
Üretici

Any comment please @Niyas Raphy

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
May 25
2372
1
Nis 25
3404
1
Nis 25
4210
1
Nis 25
1717
4
Mar 25
6812