Ajout : etc/sv/openerp_ptitvelo
[lhc/ateliers.git] / etc / nginx / site.d / ptitvelo-burette / site.conf
1 server_name
2 demo.burette.ptitvelo.net
3 burette.ptitvelo.net
4 burette.ptitvelo.heureux-cyclage.org;
5
6 client_body_buffer_size 1024k;
7 client_max_body_size 10m;
8
9 proxy_buffers 16 64k;
10 proxy_buffer_size 128k;
11
12 location ~ /\. {
13 access_log off;
14 deny all;
15 log_not_found off;
16 }
17 location / {
18 proxy_next_upstream error timeout
19 invalid_header
20 http_500
21 http_502
22 http_503;
23 # NOTE: force timeouts if the backend dies.
24 proxy_pass http://openerp_ptitvelo;
25 proxy_redirect off;
26 # NOTE: by default, do not forward anything
27 proxy_read_timeout 500;
28 proxy_set_header Host $host;
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://openerp_ptitvelo;
43 }
44
45 # vim: ft=sh