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