title: ProxyPass apache https to a node server
body: <p>I'm trying to make a apache server a gateway for my node server.<br>
  My apache will serve the static pages and the node will act as rest api server.<br>
  Both the node and the apache sits on the same server , ubuntu 64bit ec2.</p>
  
  <p>I've tried to do this for https and failed, later i've tried to open up a http port for the proxy pass and it worked ( I've changed the node to be http in order for that to work).</p>
  
  <p>my last resort will be turning the node to the web server, but I wish to keep it simple since it will go refactor soon and use meteor.</p>
  
  <p>I'll appreciate any suggestion</p>
  
  <p>This is my configuration for the apache</p>
  
  <pre><code>&lt;VirtualHost *:443&gt;
  
      ServerName secure.mysite.co.il
      ServerAdmin admin@mysite.com
      DocumentRoot /var/www/html
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
  
      SSLEngine on
      SSLCertificateFile /ssl/mysite.crt
      SSLCertificateKeyFile /ssl/mysite.key
      SSLCertificateChainFile /ssl/ca-bundle-client.crt
  
      ProxyPreserveHost On
      ProxyRequests Off
      ProxyPass /echo/test https://127.0.0.1:8001/echo/test
      ProxyPassReverse /echo/test https://127.0.0.1:8001/echo/test
  </code></pre>
  
  <p></p>
  
  <p>successfull http config</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin admin@mysite.com
      ServerName mysite.co.il
      ServerAlias www.mysite.co.il
      DocumentRoot /var/www/html
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
      ProxyPreserveHost On
      ProxyRequests Off
      ProxyPass / http://127.0.0.1:8001/
      ProxyPassReverse / http://127.0.0.1:8001/
  &lt;/VirtualHost&gt;
  </code></pre>