Odoo17_x_sendfile配置

发布时间 2024-01-10 14:51:37作者: 手可摘星辰。

1.作用:将odoo中的文件附件通过nginx去代理。

2.配置文件中将x_sendfile设置为True。

x_sendfile = True

3.使用nginx反向代理odoo服务。

  nginx的user最好设置一个有权限访问odoo的data_dir目录的用户。或者开放该目录的访问权限。

  然后nginx增加一个loaction如下:

    location /web/filestore {
        internal;
        alias /home/aaa/odoo/odoo-17.0/data/filestore;
    }