title: Websockets reverse proxy in IIS 8
body: <p>I'm attempting to connect to a websockets server (websockify) through a reverse proxy on IIS. The IIS and websockets server reside on the same physical server (Windows Server 2012 R2, IIS 8.5, ARR 3, Websockets enabled). I've seen a few questions about this and it's suggested this should work with IIS 8 and ARR 3, but no actual solutions as yet. I have some experience with http/https reverse proxies in IIS, but this is my first attempt working with websockets.</p>
  
  <p>For example:</p>
  
  <p>The original url: 
  ws://10.2.1.10/websockify</p>
  
  <p>The reverse proxy needs to translate this to:
  ws://10.2.1.10:5901/websockify</p>
  
  <p>Overly general sample rule in web.config:</p>
  
  <pre><code>&lt;rewrite&gt;
       &lt;rules&gt;               
          &lt;rule name="WS reverse proxy" stopProcessing="true"&gt; 
            &lt;match url="(.*)" /&gt;
            &lt;conditions&gt; &lt;add input="{CACHE_URL}" pattern="^(.+)://" /&gt; 
            &lt;/conditions&gt; 
            &lt;action type="Rewrite" url="{C:1}://10.2.1.10:5901/websockify"/&gt;       
          &lt;/rule&gt;
       &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p>Per the Failed Request Trace, the url appears to be translated, but for some reason it doesn't reach the websocket server at 10.2.1.10:5901. </p>
  
  <p>The end goal is to incorporate noVNC/websockify to provide browser based client access to multiple VNC servers on the network. Any help understanding how to reverse proxy the websockets is appreciated.</p>