Corrections : etc/nginx/org/heureux-cyclage/burettes/
[lhc/admin.git] / srv / ateliers / etc / nginx / org / heureux-cyclage / burettes / common.conf
1 include /etc/nginx/org/heureux-cyclage/burettes/name.conf;
2
3 client_body_buffer_size 1024k;
4 client_max_body_size 10m;
5
6 proxy_buffers 16 64k;
7 proxy_buffer_size 128k;
8
9 location ~ /\. {
10 access_log off;
11 deny all;
12 log_not_found off;
13 }
14 location / {
15 proxy_next_upstream error timeout
16 invalid_header
17 http_500
18 http_502
19 http_503;
20 # NOTE: force timeouts if the backend dies.
21 proxy_pass http://openerp7_burette;
22 proxy_redirect off;
23 # NOTE: by default, do not forward anything
24 proxy_read_timeout 500;
25 proxy_set_header Host $host;
26 proxy_set_header OpenERP-DB-Filter $burette_dbfilter;
27 # TODO: utiliser un certificat utilisateurice X.509
28 # pour initialiser cette variable.
29 proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
30 proxy_set_header X-Forwarded-Proto https;
31 # NOTE: let the OpenERP web service know that we're using HTTPS,
32 # otherwise it will generate URL using http:// and not https://
33 proxy_set_header X-Real-IP $remote_addr;
34 }
35
36 location ~* ^/web/static/ {
37 # NOTE: cache some static data in memory for 60mins;
38 # under heavy load this should relieve stress on the OpenERP web interface a bit.
39 expires 864000;
40 proxy_buffering on;
41 proxy_cache_valid 200 60m;
42 proxy_pass http://openerp7_burette;
43 }
44
45 # vim: ft=sh