title: Websockets with socket.io on AWS Elastic Beanstalk
body: <p>I'm trying to setup a websocket-server with socket.io on AWS Elastic Beanstalk. Got the initial request to /socket.io/1/?t=xxxx up and running but the websocket handshake fails with this error:</p>
  
  <pre><code>WebSocket connection to 'ws://xxxxxx.elasticbeanstalk.com/socket.io/1/websocket/a4DTCN2BeJZuiSaphVyz' failed: Unexpected response code: 502 
  </code></pre>
  
  <p>From googling and looking at the error 502 (Bad Gateway) it seems to have something to do with the nginx-proxy. So how do I configure the nginx to work with websockets?</p>
  
  <p>Can't find anything in AWS documentation about setting up for websockets.</p>