Answer the question
In order to leave comments, you need to log in
Node.js server is running - why is the page not opening in the browser?
VPS: CentOS 6.6_x64
Installed Node.JS v.10.35
The web server script is in the file var/www/server.js
1. By command "node var/www/server.js" the server starts.
2. I open a browser, enter http://<my IP address>:8888
I did several actions on recommendations from the network, including -A INPUT -m state --state NEW -m tcp -p tcp --dport 8888 - j ACCEPT, did not help.
I understand that you need to open the port.
Tell me please!
Answer the question
In order to leave comments, you need to log in
Perhaps, after adding the rule to iptables, you did not save the table through service ip6tables save
and reloaded the basin. To check if there is a problem at least in it, turn it off for a while through service ip6tables stop
check it in the browser and then turn it on through service ip6tables start
and you can completely remove the firewall from the actupload through chkconfig ip6tables off
, and return it through chkconfig ip6tables on
. Try the following rule:
iptables -A INPUT -p tcp -m tcp --dport 8888 -j ACCEPT
But you also need to check whether the node server binds to the same IP (hostname) through the server.listen(port, [ip])
. If you put IP "0.0.0.0"
, then it will sit on all interfaces. If all this does not help, then you need to check the firewall at the data center / hosting, perhaps there is a control panel in which you can forward ports to the outside world.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question