跳至内容
菜单
此问题已终结
3 回复
4643 查看

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

形象
丢弃
最佳答案

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

形象
丢弃
编写者 最佳答案

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?

形象
丢弃

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

编写者

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

最佳答案

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

形象
丢弃
编写者

Any comment please @Niyas Raphy

相关帖文 回复 查看 活动
1
5月 25
2356
1
4月 25
3390
1
4月 25
4199
1
4月 25
1700
4
3月 25
6801