Question

Nodejs not allowing access to https://mydomain.com:3000 refusal

Hello community,

I had a pre server install nodejs and npm after. I hand installed a lamp server on it. But I would like to run apps which require node.js

Would like to access to https://peopleandchat.org:3000 it will not load anything.

Any ideas how I can get this to work correctly? using socket.IO chat.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@peopleandchat

It really depends on what IP you’re using to start the server for the app.

If you use localhost or 127.0.0.1, you won’t be able to access the app via port using your domain as only local access is being permitted.

You’d need to use 0.0.0.0 as the IP, or configure Apache to proxy all requests on port 80 to the local address and port your running the application on.

Look very closely at jtittle1 's answer. I wasted a whole day on this because my ports were misconfigured between localhost, ‘127.0.0.1’ and not having any host in my express js server. Instead of

app.listen(port, () =>

it should be

app.listen(port, hostname, ()=>

This comment has been deleted