apache2 / nodejs / express on a digital ocean server - how to listen to public port (80) without address in use error apache2 / nodejs / express on a digital ocean server - how to listen to public port (80) without address in use error express express

apache2 / nodejs / express on a digital ocean server - how to listen to public port (80) without address in use error


You need to use a proxy.

nginx example:

server {    listen 80;    server_name subdomain.domain.com    location / {        proxy_pass http://localhost:3000;    }   }

Apache:

<VirtualHost *:*>    ProxyPass / http://0.0.0.0:3000/    ServerName localhost</VirtualHost>

More info here