<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Giacomo,<br>
      <br>
      Have a look at nginx error and access logs.<br>
      Most likely, that's tomcat default timeout fires.<br>
      <br>
      Regards,<br>
      Igor.<br>
      <br>
      On 04.07.2018 17:17, Giacomo Arru - BETA Technologies wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2033867596.629881.1530713838115.JavaMail.zimbra@beta.srl">
      <div style="font-family: arial, helvetica, sans-serif; font-size:
        12pt; color: #000000">
        <div><!--StartFragment-->
          <p style="margin: 0px;" data-mce-style="margin: 0px;">Tomcat:
            9.0.8 nginx: 1.12.2</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;">I have
            this configuration:</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;">Vaadin 8
            application, served via Tomcat 9.</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;">The
            application has manual push with websocket transport.</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><strong>If
              I use the app directly from Tomcat,</strong><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;">-the
            Websocket connection works correctly.</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;">-the
            upload within the app of 10mb files works.</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><strong>If
              I use the application through nginx proxy,</strong></p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;">the
            upload works for very small files only (max 61440 bytes) and
            the websocket initially works, but after 30 seconds the
            application hangs (I think the websocket gets closed).</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;">This is
            the nginx configuration:</p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><strong>nginx.conf</strong><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">user nginx;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">worker_processes auto;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">error_log /var/log/nginx/error.log;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">pid /run/nginx.pid;</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;"># Load dynamic modules. See
              /usr/share/nginx/README.dynamic.</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">include
              /usr/share/nginx/modules/*.conf;</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">events {</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    worker_connections 1024;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">}</span><br>
            <br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">http {</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    log_format  main  '$remote_addr
              - $remote_user [$time_local] "$request" '</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">                      '$status
              $body_bytes_sent "$http_referer" '</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">                     
              '"$http_user_agent" "$http_x_forwarded_for"';</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    log_format main_ext
              '$remote_addr - $remote_user [$time_local] "$request" ' </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">            '$status
              $body_bytes_sent "$http_referer" ' </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">            '"$http_user_agent"
              "$http_x_forwarded_for" ' </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">            '"$host"
              sn="$server_name" ' </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">            'rt=$request_time ' </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">            'ua="$upstream_addr"
              us="$upstream_status" ' </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">           
              'ut="$upstream_response_time"
              ul="$upstream_response_length" ' </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">           
              'cs=$upstream_cache_status' ;</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    access_log 
              /var/log/nginx/access.log  main_ext;</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    # Mitigate httpoxy attack (see
              README for details)</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_set_header Proxy "";</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    include            
              /etc/nginx/mime.types;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    default_type       
              application/octet-stream;</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    map $http_upgrade
              $connection_upgrade {</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">        default upgrade;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">        ''      close;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    }</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    # Load modular configuration
              files from the /etc/nginx/conf.d directory.</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    # See
              <a class="moz-txt-link-freetext" href="http://nginx.org/en/docs/ngx_core_module.html#include">http://nginx.org/en/docs/ngx_core_module.html#include</a></span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    # for more information.</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    include
              /etc/nginx/conf.d/*.conf;</span><br>
            <br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    server {</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    listen 80;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    server_name demo.myserver.com;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">        # Load configuration files
              for the default server block.</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">        include
              /etc/nginx/default.d/*.conf;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    }</span><br>
            <br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    client_body_buffer_size    
              10M;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    client_max_body_size       
              10M;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    gzip                        on;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    send_timeout               
              600;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_connect_timeout      
              81640;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_send_timeout         
              81640;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_read_timeout           
              81640;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_set_header Connection   
              "";</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_http_version           
              1.1;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_buffering               
              off;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_redirect               
              off;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    proxy_request_buffering       
              off;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    types_hash_max_size           
              2048;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    sendfile                    on;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    tcp_nopush                   
              on;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    tcp_nodelay                   
              on;</span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">    </span><br>
            <span style="font-family: "lucida console",
              sans-serif;" data-mce-style="font-family: 'lucida
              console', sans-serif;">}</span><br>
            <br>
            <br data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><br
              data-mce-bogus="1">
          </p>
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><strong>myvhost.conf</strong><br
              data-mce-bogus="1">
          </p>
          <br data-mce-bogus="1">
          <p style="margin: 0px;" data-mce-style="margin: 0px;"><!--EndFragment-->
          </p>
          <!--EndFragment--></div>
        <div><br data-mce-bogus="1">
        </div>
        <div><br data-mce-bogus="1">
        </div>
        <div><span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">proxy_cache_path /tmp/NGINX_cache-demo/
            levels=1:2 keys_zone=demo:10m max_size=100m inactive=1h;</span><br>
          <br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">upstream demo {</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    ip_hash;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;"> </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    server 172.16.1.1:8080 max_fails=0
            fail_timeout=3s;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    keepalive 100;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">}</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;"> </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">     </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">server {</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    listen 80;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    server_name demo.myserver.com;</span><br>
          <br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    # Redirect all HTTP to HTTPS</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    location / {    </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        return 301
            <a class="moz-txt-link-freetext" href="https://$server_name$request_uri">https://$server_name$request_uri</a>;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    }</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">}</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;"> </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">server {</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    server_name demo.impresacloud.com;</span><br>
          <br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    listen 443 ssl http2; # managed by Certbot</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    ssl_certificate
            /etc/letsencrypt/live/demo.impresacloud.com/fullchain.pem; #
            managed by Certbot</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    ssl_certificate_key
            /etc/letsencrypt/live/demo.impresacloud.com/privkey.pem; #
            managed by Certbot</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    include
            /etc/letsencrypt/options-ssl-nginx.conf; # managed by
            Certbot</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    ssl_dhparam
            /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    access_log /var/log/nginx/access_demo.log
            main_ext; </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    error_log /var/log/nginx/error_demo.log
            info; </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        client_max_body_size 128m;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        # disable unsupported ciphers</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #ssl_ciphers AESGCM:HIGH:!aNULL:!MD5;</span><br>
          <br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        # ssl optimizations</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        ssl_session_cache shared:SSL:60m;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #sl_session_timeout 60m;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        add_header Strict-Transport-Security
            "max-age=31536000";</span><br>
          <br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            client_header_timeout 3m;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            client_body_timeout 3m;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    # Risolve loop di redirect</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    location = /app/ {</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        return 302 /;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    }</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    location = /app {</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        return 302 /;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    }</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;"> </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    # A location block is needed per URI group</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    location / {</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_read_timeout 300;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_connect_timeout 300;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_cache demo;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_cookie_path /app /;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        error_page 500 502 503 504
            /server_down.html;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        ### force timeouts if one of backend is
            died ##</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_next_upstream error timeout
            invalid_header http_500 http_502 http_503 http_504;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        ### Set headers ####</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_set_header       
            Accept-Encoding   "";</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_set_header X-Forwarded-Host   
                    $host;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_set_header        Host           
                $host;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_set_header        X-Real-IP      
                $remote_addr;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_set_header        X-Forwarded-For
                $proxy_add_x_forwarded_for;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_set_header       
            X-Forwarded-Server    $host;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_cache_bypass $http_upgrade;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_set_header Upgrade $http_upgrade;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_set_header Connection
            $connection_upgrade;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            proxy_buffering           off;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            proxy_ignore_client_abort off;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            proxy_redirect off;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        ### Most PHP, Python, Rails, Java App
            can use this header ###</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_set_header       
            X-Forwarded-Proto $scheme;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #add_header             
            Front-End-Https   on;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_pass_request_headers On;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_buffer_size 64k;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_buffers 16 32k;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #proxy_busy_buffers_size 64k;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            #proxy_connect_timeout   3600;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            #proxy_read_timeout      84600s;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">            #proxy_send_timeout      84600s;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        #reset_timedout_connection    off;</span><br>
          <br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        proxy_pass <a class="moz-txt-link-freetext" href="http://demo/app/">http://demo/app/</a>;        </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    }</span><br>
          <br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">       location = /server_down.html {</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">        root  /opt/ImpresaCloud/proxy_html/;</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">    }</span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">   </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">   </span><br>
          <span style="font-family: "lucida console",
            sans-serif;" data-mce-style="font-family: 'lucida console',
            sans-serif;">}</span><br>
          <br>
          <br data-mce-bogus="1">
        </div>
      </div>
      <!--'"--><br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>