title: Trying to get Websockify/noVNC to work through a reverse proxy
body: <p>I'm trying to figure out how to get noVNC to work through a reverse proxy, and while it works if I connect directly to it, it doesn't seem to work if I try to reverse proxy.</p>
  
  <p>namely:</p>
  
  <p>I run it as <code>./utils/launch.sh --vnc localhost:5901</code></p>
  
  <p>if I connect to it as <code>https://&lt;machine&gt;:6080/vnc.html?host=&lt;machine&gt;&amp;port=6080</code></p>
  
  <p>it works fine and I can connect to the vnc session</p>
  
  <p>However, I want to be able to connect to it via a reverse proxy over port 443.</p>
  
  <p>In Apache 2.4.10 (-8 in Debian Jessie), I've configured my proxy line to be</p>
  
  <pre><code>ProxyPass /home http://127.0.0.1:6080/
  ProxyPassReverse /home http://127.0.0.1:6080/
  ProxyPass /websockify wss://127.0.0.1:6080/websockify retry=3
  ProxyPassReverse /websockify wss://127.0.0.1:6080/websockify retry=3
  </code></pre>
  
  <p>and I connect to it as <code>https://&lt;machine&gt;/vnc.html?host=&lt;machine&gt;&amp;port=6080</code></p>
  
  <p>This still works, as while the fetch of the html/javascript is going through the reverse proxy, I'm still telling the websocket connection to go over 6080 and it works.</p>
  
  <p>However, when I change it to <code>https://&lt;machine&gt;/vnc.html?host=&lt;machine&gt;&amp;port=443</code></p>
  
  <p>I get the html/javascript just fine, but when it goes to make the connection, in firefox (and chrome and IE, but this error is from firefox in specific) I quickly get</p>
  
  <pre><code>Firefox can't establish a connection to the server at wss://&lt;machine&gt;/websockify.
  </code></pre>
  
  <p>and in noVNC I see the error message</p>
  
  <pre><code>127.0.0.1: ignoring socket not ready
  </code></pre>