title: tunneling secure websocket connections with apache
body: <p>I have an Apache running that is only accessible via HTTPS. I want to serve websockets from an additional server application which runs on the same machine, but since it is not possible for clients to connect on another port than 443 to our server, those websocket connections need to be proxied through the Apache.</p>
  
  <p>Now, I've installed mod_proxy and configured it as follows:</p>
  
  <pre><code>SSLProxyEngine on
  ProxyPass /ws https://127.0.0.1:9001
  </code></pre>
  
  <p>This does not work however. I can connect to <em>https://server/ws</em> in my browser now, but the apache seems to swallow part of the websockets headers, so that real websocket connections do not work.</p>
  
  <p>How can I accomplish tunneling my websocket connections through the Apache server?</p>