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