title: Meteor on httpd (Apache/2.4.6 CentOS) proxy and WebSockets
body: <p>I can't workout how to get WebSockets to work when I deploy my meteor app online. I keep getting this error:</p>
  
  <pre><code>WebSocket connection to 'ws://website.com/sockjs/***/********/websocket' failed: Unexpected response code: 400
  </code></pre>
  
  <p>I think this is due to the fact that apache sits in front of my meteor app. I know <code>Apache 2.4</code> had a bug to make <code>ws://</code> working, but I think this should be resolved by <code>modules/mod_proxy_wstunnel.so</code>, which I have enabled (of course I have enabled also <code>modules/mod_proxy.so</code>)</p>
  
  <p>Here's my config. I'm running <code>Meteor 1.2.1</code> as a systemd service (<code>/etc/systemd/system/meteor.service</code>) like so:</p>
  
  <pre><code>[Unit]
  Description=meteor nodejs daemon
  After=network.target remote-fs.target
  
  [Service]
  User=root
  ExecStart=/usr/bin/node /home/root/www/main.js
  Restart=always
  StandardOutput=syslog
  StandardError=syslog
  SyslogIdentifier=meteor
  Environment=ROOT_URL=http://website.com
  Environment=PORT=3000
  Environment=NODE_ENV=production
  Environment=MONGO_URL=mongodb://127.0.0.1:27017/meteor
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>This is the output of <code>httpd -v</code></p>
  
  <pre><code>Server version: Apache/2.4.6 (CentOS)
  Server built:   Aug 28 2015 22:11:18
  </code></pre>
  
  <p>And this is the relevant part in my vhost config (<code>/etc/httpd/conf/httpd.conf</code>) for <code>website.com</code>:</p>
  
  <pre><code>&lt;VirtualHost my.ser.ver.ip:8080&gt;
      ServerName website.com
      ServerAlias www.website.com
      ProxyRequests Off
      ProxyPass / http://localhost:3000/
      ProxyPassReverse / http://localhost:3000/
      &lt;Proxy *&gt;
          Allow from all
      &lt;/Proxy&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I've already tried to add the <code>RewriteCond</code> as suggested <a href="https://stackoverflow.com/a/34371105/1435476">here</a> but no success...</p>
  
  <p>Any idea? I'm also having issue getting <code>oauth</code> to work with the <code>accounts-facebook</code> package and I guess the problem is for the same reason? As in, there is something wrong in my proxy settings?</p>