Update to 2023-07-20 14:00

This commit is contained in:
Daniel Berteaud
2023-07-20 14:00:26 +02:00
parent 46009264eb
commit 5fa912498c
13 changed files with 131 additions and 38 deletions

View File

@@ -0,0 +1,46 @@
server {
listen 443 ssl http2;
server_name {{ odoo_public_url | default('https://_/') | urlsplit('hostname') }};
root /usr/share/nginx;
location /websocket {
proxy_pass http://localhost:{{ odoo_longpolling_port }};
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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;
}
location /web/filestore {
internal;
alias {{ odoo_root_dir }}/filestore;
}
location @odoo {
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://localhost:{{ odoo_http_port }};
}
location ~ ^/[^/]+/static/.+$ {
root {{ odoo_root_dir }}/app/addons;
try_files {{ odoo_root_dir }}/enterprise$uri {{ odoo_root_dir }}/app/addons$uri {{ odoo_root_dir }}/app/odoo/addons$uri @odoo;
expires 24h;
}
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://localhost:{{ odoo_http_port }};
}
}