Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

nginx.service - loaded failed failed

形象
odoo
形象
丢弃
2 答案
0
形象
odoo
最佳答案

Hi,

Please check the nginx log for more details about the same.

Odoo Nginx: Configure Odoo With Nginx As a Reverse Proxy

Thanks

形象
丢弃
0
形象
odoo
最佳答案

Thanks your reply.

actually when installed nginx with Odoo 15, the nginx test was also successful. (sudo nginx -t)

I followed the steps of same video that you shared and created new odoo15.conf in etc/nginx/sites-available. After creating this new file it started giving error and sudo nginx -t was also unsuccessful.


Following are the parameters of file which I created:

#odoo server

upstream odoo {

server 127.0.0.1:8069;

}

upstream odoochat {

server 127.0.0.1:8072;

}



server {

listen 80;

server 159.xxx.xx.xxx;


proxy_readx_timeout 300;

proxy_connect_timeout 300;

proxy_send_timeout 300;



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


# log

access_log /var/log/nginx/odoo.access.log;

error_log /var/log/nginx/odoo.error.log;


# Redirect requests to odoo backend server

location / {

proxy_redirect off;

proxy_pass http://odoo;

}

location /longpolling {

proxy_pass http://odoochat;

}


# common gzip

gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;

gzip on;



client_body_in_file_only clean;

client_body_buffer_size 32K;

client_max_body_size 500M;

sendfile on;

send_timeout 600s;

keepalive_timeout 300;

}


Following is the error of sudo nginx -t:


nginx: [emerg] "server" directive is not allowed here in /etc/nginx/sites-enabled/odoo15.conf:12

nginx: configuration file /etc/nginx/nginx.conf test failed


 

形象
丢弃