Home > AI > Backend > NodeJs >

Run test node on VPS

After executing node server.js, it successfully prompts ‘Application is on port 8000’, while how to access the page becomes a problem. I tried both https://cowpte.com:8000 and https://{ip}:8000 and neither are working.

It may be because it was blocked by firewall

sudo firewall-cmd –zone=public –add-port=8080/tcp –permanent

// show all ports
sudo firewall-cmd --list-ports

// show all services
sudo firewall-cmd --list-services

// add new port
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent

// make it work
sudo firewall-cmd --reload

ERR_SSL_PROTOCOL_ERROR

When visiting https://cowpte.com:8000, I get ERR_SSL_PROTOCOL_ERROR. But visiting https://{ip}:8000 is working. Will discuss the previous issue later.

Leave a Reply