title: Reverse proxy to node js throwing 503?
body: <p><strong>Edit:</strong> See my answer. I found the solution, but I'll leave this up as reference.</p>
  
  <p>I'm on CentOS 7 with Apache 2.4.6</p>
  
  <p>I'm trying to have a subdomain of mine redirect to a node.js express web server. The node server is listening on port 8080 and I can use <code>wget http://localhost:8080</code> to download the page I want to load, so to me that means the problem I'm having is with the Apache proxy.</p>
  
  <p>I tried following <a href="https://stackoverflow.com/questions/8541182/apache-redirect-to-another-port">this</a> which led to <a href="https://serverfault.com/questions/195611/how-do-i-redirect-subdomains-to-a-different-port-on-the-same-server/195831#195831">this</a>, and then also tried the suggestions <a href="https://stackoverflow.com/questions/37832844/node-js-consistently-giving-503-error">here</a>, but I'm still getting a 503 "Service unavailable" page when I visit the URL.</p>
  
  <p>This is my virtual host for that subdomain (actual url changed):</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    ServerName foo.example.com
  
    ProxyPreserveHost On
    ProxyRequests Off
  
    &lt;Proxy *&gt;
      Order deny,allow
      Allow from all
    &lt;/Proxy&gt;
  
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I worried mod_proxy and mod_proxy_http weren't enabled even though <code>httpd -M</code> showed <code>proxy_module (shared)</code> and <code>proxy_http_module (shared)</code> in the list, so I've added the following lines to httpd.conf:</p>
  
  <pre><code>LoadModule proxy_module modules/mod_proxy.so
  LoadModule proxy_http_module modules/mod_proxy_http.so
  </code></pre>
  
  <p>If there is anything obvious I'm doing wrong, or if there's any more information that would be helpful, please let me know! Thanks!</p>