Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
4714 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhấ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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhấ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?

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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

Câu trả lời hay nhấ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

Ảnh đại diện
Huỷ bỏ
Tác giả

Any comment please @Niyas Raphy

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 25
2463
1
thg 4 25
3485
1
thg 4 25
4316
1
thg 4 25
1791
4
thg 3 25
6908