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

Hi,


I had recently installed an instance for Odoo15 with Nginx as a reverse proxy. 


While logging into the backend, the website goes to the address - http://odoo/web and the page goes blank.


Unable to understand.


Nginx Config file as follows:


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

# http -> https
#server {
# listen 80;
# server_name inflow.co.in;
# rewrite ^(.*) https://$host$1 permanent;
#}

server {
listen 80;
server_name inflow.co.in;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;

# Add Headers for odoo proxy mode
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;

# SSL parameters
#ssl on;
#ssl_certificate /etc/ssl/nginx/server.crt;
#ssl_certificate_key /etc/ssl/nginx/server.key;
#ssl_session_timeout 30m;
#ssl_protocols TLSv1.2;
#ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
#ssl_prefer_server_ciphers off;

# log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;

# Redirect longpoll requests to odoo longpolling port
location /longpolling {
proxy_pass http://odoochat;
}

# Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_pass http://odoo;
}

# common gzip
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
gzip on;

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

}


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

This worked for me as well. Thank you!

I really want to appreciate this support shared by you, this is amazing.


this solution worked for me on Odoo 16. appreciate.

Câu trả lời hay nhất

Try to change 

 proxy_set_header X-Forwarded-Host $host;

to 
 proxy_set_header Host $host;

You can check Nginx’s configuration files to make sure they’re correctly typed:

sudo nginx -t


Then reload nginx

sudo systemctl restart nginx



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

Thanks, that work for me :)

Câu trả lời hay nhất

Hi, you can follow this: https://youtu.be/-3wV7A_4s-w

Hope it helps

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Configuring Nginx in Odoo:  https://www.youtube.com/watch?v=-hVYQd7A7PQ

Nginx conf sample: https://github.com/odoomates/odoosamples/blob/main/odoo_nginx_conf

Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 24
2448
1
thg 4 24
4157
2
thg 7 23
6267
0
thg 4 23
2415
0
thg 3 23
118