标签:timeout 完成 less json log href out access 服务器
大部分同学对Odoo12配置域名访问都有或多或少的问题,这边ERP大学整理了以centos7服务器为基础,nginx为WEB服务器配置odoo12域名访问,前提是必须odoo12已经配置好了本机或者ip访问.
yum install nginx
vim /etc/nginx/conf.d/odoo12ce_nginx.conf
upstream odoo {
server 127.0.0.1:8069;
}
server {
listen 80;
server_name odoo.test;
# proxy
proxy_buffers 16 64k;
proxy_buffer_size 128k;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
location / {
access_log /var/log/nginx/odoo12ce_access.log;
error_log /var/log/nginx/odoo12ce_error.log;
proxy_redirect off;
proxy_pass http://odoo;
client_max_body_size 200m;
}
}
nginx的启动命令为:systemctl start nginx
如要设置为开机自启动,输入命令: systemctl enable nginx
有些同学可能配置完成后访问域名,会提示502错误,这是是因为SeLinux的限制。
执行命令:setsebool -P httpd_can_network_connect 1即可
odoo12正常访问
原文链接: https://www.erpdaxue.cn/odoo/odoo教程/odoo12配置centos7服务器域名访问/
标签:timeout 完成 less json log href out access 服务器
原文地址:https://www.cnblogs.com/odoo12/p/12499095.html