Debian Codegraph @

addons/iot_box_image/overwrite_after_init/etc/nginx/conf.d/iot.conf

raw
1 server {
2 listen 80;
3 listen [::]:80;
4 listen 443 ssl http2;
5 listen [::]:443 ssl http2;
6
7 ssl_certificate /etc/ssl/certs/nginx-cert.crt;
8 ssl_certificate_key /etc/ssl/private/nginx-cert.key;
9
10 # Increase the allowed body size from 1MB to 10MB, this ensures
11 # large actions such as printing a PDF will always work.
12 client_max_body_size 10M;
13
14 location / {
15 # Increase the request timeout from 1 minute to 10 minutes,
16 # this is required for the self-flashing feature.
17 proxy_read_timeout 600s;
18 proxy_pass http://127.0.0.1:8069;
19 }
20
21 # If the iot_drivers module fails to start, the user will be sent to the
22 # database selector. Instead of this we will show them the 502 error page
23 # (IoT box is down) as it is more appropriate.
24 location /web/database/selector {
25 return 301 /502.html;
26 }
27
28 error_page 502 /502.html;
29 location /502.html {
30 root /var/www/html;
31 }
32
33 # Expose the /var/log/ folder directly via nginx, so that
34 # it remains accessible even if Odoo is failing to start.
35 location /odoo-logs {
36 alias /var/log/;
37 autoindex on;
38 }
39 }