X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=etc%2Fnginx%2Fsite.d%2Flhc-burette-demo%2Fsite.conf;fp=etc%2Fnginx%2Fsite.d%2Flhc-burette-demo%2Fsite.conf;h=97550e8316253b6d7eefe0673334ad97a5ce8797;hb=f04433e59c07c099e6171e199a533f57e71bed22;hp=0000000000000000000000000000000000000000;hpb=c620d51c00b82e2caed368f1dd490e3239c51ec6;p=lhc%2Fateliers.git diff --git a/etc/nginx/site.d/lhc-burette-demo/site.conf b/etc/nginx/site.d/lhc-burette-demo/site.conf new file mode 100644 index 0000000..97550e8 --- /dev/null +++ b/etc/nginx/site.d/lhc-burette-demo/site.conf @@ -0,0 +1,43 @@ +server_name + demo.burette.heureux-cyclage.org; + +client_body_buffer_size 1024k; +client_max_body_size 10m; + +proxy_buffers 16 64k; +proxy_buffer_size 128k; + +location ~ /\. { + access_log off; + deny all; + log_not_found off; + } +location / { + proxy_next_upstream error timeout + invalid_header + http_500 + http_502 + http_503; + # NOTE: force timeouts if the backend dies. + proxy_pass http://openerp_lhc_demo; + proxy_redirect off; + # NOTE: by default, do not forward anything + proxy_read_timeout 500; + proxy_set_header Host $host; + proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + # NOTE: let the OpenERP web service know that we're using HTTPS, + # otherwise it will generate URL using http:// and not https:// + proxy_set_header X-Real-IP $remote_addr; + } + +location ~* ^/web/static/ { + # NOTE: cache some static data in memory for 60mins; + # under heavy load this should relieve stress on the OpenERP web interface a bit. + expires 864000; + proxy_buffering on; + proxy_cache_valid 200 60m; + proxy_pass http://openerp_lhc_demo; + } + +# vim: ft=sh