2

I made a simple node.js server:

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(9999, '0.0.0.0');
console.log('Server running at post 9999');

it works outputting:

Server running at port 9999

yet I can't reach it at VPS/VDS IP where the code is residing: http://185.221.154.249:9999/ Why is that?

Does it matter what location inside of my VDS (centos 7) the code is located?

Note: My domain is tied to that IP and works well at post 443: https://webscraping.pro/ (blog on WP is there)

1
  • Are you sure that is the code you are actually running? You should copy and paste it to be sure. – Michael Hampton Dec 30 '20 at 16:31
1

The issue you encounter is with the ports not allowed by Firewall. Please set up the firewall setting to allow port 9999, make it open. If you're not able to do that ask a hosting support to help with it. What control panel do you use?

Update:

enter image description here

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.