title: Configuring Nginx and Socket.IO
body: <p>I'm trying to configure <a href="http://nginx.org" rel="nofollow">Nginx</a> to work with <a href="http://socket.io" rel="nofollow">Socket.IO</a></p>
  
  <p>and I have found <a href="https://github.com/LearnBoost/socket.io/wiki/Nginx-and-Socket.io" rel="nofollow">this</a> in Socket.IO github wiki.</p>
  
  <p>I have installed Nginx 1.1.10.</p>
  
  <pre><code>server {
    listen 80;
    server_name socket.myserver.com;
    location / {
      proxy_pass http://localhost:3030;
    }
  }
  </code></pre>
  
  <p>Below is my Socket.io code</p>
  
  <pre><code>var io = require('socket.io').listen(3030);
  
  io.configure(function() {
          io.enable('browser client etag');
          io.set('transports', [
           'websocket','xhr-polling'
    ]);
  });
  
  io.sockets.on('connection', function (socket) {
    socket.emit('news', { hello: 'world' });
    socket.on('my other event', function (data) {
      console.log(data);
    });
  });
  </code></pre>
  
  <p>And this is my client site code</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script src="http://socket.mysite.com/socket.io/socket.io.js"&gt;&lt;/script&gt;
          &lt;script&gt;
            var socket = io.connect('http://socket.mysite.com');
            socket.on('news', function (data) {
              console.log(data);
              socket.emit('my other event', { my: 'data' });
            });
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm confronting problem that the console shows only</p>
  
  <pre><code>info  - socket.io started
  debug - served static content /socket.io.js
  </code></pre>
  
  <p>I know that it should creates some logs about "handshakes and heartbeats"</p>
  
  <p>Did I configure something wrong? Or does my code have some errors?</p>