I'm trying to make a apache server a gateway for my node server.
My apache will serve the static pages and the node will act as rest api server.
Both the node and the apache sits on the same server , ubuntu 64bit ec2.
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).
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.
I'll appreciate any suggestion
This is my configuration for the apache
<VirtualHost *:443>
ServerName secure.mysite.co.il
ServerAdmin [email protected]
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
successfull http config
<VirtualHost *:80>
ServerAdmin [email protected]
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/
</VirtualHost>