Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
4631 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor Mejor respuesta

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
Descartar

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

Autor

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

Mejor respuesta

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
Descartar
Autor

Any comment please @Niyas Raphy

Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
2324
1
abr 25
3364
1
abr 25
4170
1
abr 25
1669
4
mar 25
6758