nginx.conf

upstream backend {
   server 127.0.0.1:8080;
}

server {
       listen 80;

       client_header_timeout 60;
       client_body_timeout   60;
       client_max_body_size  400M;
       keepalive_timeout     60;
       gzip                  on;
       gzip_comp_level       4;
       root                  /www;

       location ~* \.(eot|ttf|woff|woff2|jpg|jpeg|png|gif|css|js)$ {
            access_log off;
            break;
       }

       location / {
            if ($http_user_agent ~* '^ELB-HealthChecker\/.*$' ) {
              return 200;
            }

            try_files $uri/index.html @backend;
       }

       location /favicon.ico {
        access_log         off;
        log_not_found      off;
       }


       location @backend {
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $host;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "Upgrade";
          proxy_pass  http://backend;
          proxy_http_version 1.1;
          proxy_redirect off;
       }

}