Apache nodejs proxy server

Apache2node.jsreverse-proxy

I have created a node program that it's working on http://example.com:3000/node/index.html and I want to "hide" the port (3000).

I have been reading that I need the a proxy server so I configured apache in different ways but I can't reach what I want.

For example I have used:

<VirtualHost myip:8443 myip:8080>     
ServerName example.com    
ServerAlias www.example.com     
DocumentRoot /home/www/  
ProxyPreserveHost On 
ProxyPass /node http://example.com:3000/ 
ProxyPassReverse /node http://example.com:3000/   
</VirtualHost>

Please help!!

Best Answer

Try this Apache configuration:

<VirtualHost myip:80>     
     ServerName example.com    
     ServerAlias www.example.com     
     ProxyPreserveHost On 
     ProxyPass /node http://example.com:3000/node 
     ProxyPassReverse /node http://example.com:3000/node
</VirtualHost>