title: relative path for websockets
body: <p>I have installed Apache2.2.22 and nodejs 0.10.12 succesfully in windows server 2012 r2.</p>
  
  <p>I succesfully made node a windows service, using nssm, so it will always run.</p>
  
  <p>Node "lives" in 8000 port and I have installed a proxy in apache's <code>httpd.conf</code> like so</p>
  
  <pre><code>ProxyPass /nodejs http://localhost:8000
  ProxyPassReverse /nodejs http://localhost:8000
  </code></pre>
  
  <p>When I check my site in server's browser, websockets work fine.</p>
  
  <p>When I check my site in my laptops browser, I get error.</p>
  
  <p>I guess its caused because I create websockets like so </p>
  
  <pre><code> var ci = new WebSocket("ws://localhost:8000");
  </code></pre>
  
  <p>That's why works on server,not on my laptop. Because of the <code>localhost</code>. First, am I right?</p>
  
  <p>Second. The only problem is, I dont know how to create relative paths for websockets. I have tried different syntaxes, but no luck. Please, can somebody show me how, and explain to me?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT</strong> : 
  I did not set up windows server 2012 r2. A collegue did. I just uploaded the website. I made an Inbound rule in Windows Firewall, so port 8000 is open. Also ,one for port 80 (for Apache). I tried stuff like robertklep suggests, no luck. Maybe an issue of OS? (security restrictions?)</p>
  
  <p>Inside <code>httpd.conf</code> I also have </p>
  
  <pre><code> ProxyPass /geoserver http://localhost:8080/geoserver
   ProxyPassReverse /geoserver http://localhost:8080/geoserver
  </code></pre>
  
  <p>Its before the node's proxy. Its about Geoserver and port 8080, which also has an inbound rule. Works just fine.</p>
  
  <p>Node only works locally (having <code>localhost</code> in the URL). Locally, if I remove the <code>Proxy</code> lines from <code>httpd.conf</code>, still works. </p>
  
  <p>I have no clue, how to install/configure the <code>proxy_wstunnel_module</code>. And I am not sure if I need it.</p>
  
  <p>I did everything in my powers, please advice</p>
  
  <p>Thanks</p>