configure apache nodejs proxy server

0

I have created a program with nodejs that works correctly in link but I want to "hide" the port (3000) .

I have been reading that I need a proxy server, so I configured apache in different ways but I can not achieve my goal.

For example, I have:

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

HELP !!

    
asked by Sebastian 09.04.2018 в 04:33
source

1 answer

0

It is not with the apache what you want to do, you have to change it in the hosts file.

Path in Linux or Mac:

/etc/hosts

Path in Windows:

C:/Windows/System32/drivers/etc/hosts

And then rewrite the route you want to change, in this case localhost:3000 .

localhost:3000  ejemplo.com
    
answered by 09.04.2018 в 05:30