title: WebSockets and Apache proxy: how to configure mod_proxy_wstunnel?
body: <p>I have :</p>
  <ol>
  <li><p>Apache 2.4 on port 80 of my server, with <em><a href="https://httpd.apache.org/docs/2.4/mod/mod_proxy.html" rel="nofollow noreferrer">mod_proxy</a></em> and <em><a href="https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html" rel="nofollow noreferrer">mod_proxy_wstunnel</a></em> enabled</p>
  </li>
  <li><p>Node.js + <code>socket.io</code> on port 3001 of the same server</p>
  </li>
  </ol>
  <p>Accessing <code>example.com</code> (with port 80) redirects to 2. thanks to <a href="https://stackoverflow.com/a/18604082/1422096">this method</a> with the following Apache configuration:</p>
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName example.com
      ProxyPass / http://localhost:3001/
      ProxyPassReverse / http://localhost:3001/
      ProxyPass / ws://localhost:3001/
      ProxyPassReverse / ws://localhost:3001/
  &lt;/VirtualHost&gt;
  </code></pre>
  <p>It works for everything, except the websocket part : <code>ws://...</code> are not transmitted like it should by the proxy.</p>
  <p>When I access the page on <code>example.com</code>, I have:</p>
  <pre><code>Impossible to connect ws://example.com/socket.io/?EIO=3&amp;transport=websocket&amp;sid=n30rqg9AEqZIk5c9AABN.
  </code></pre>
  <p>Question: <strong>How to make Apache proxy the WebSockets as well?</strong></p>