mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2023-07-20 14:00
This commit is contained in:
46
roles/odoo/templates/nginx.conf.j2
Normal file
46
roles/odoo/templates/nginx.conf.j2
Normal 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 }};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user