成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁技術文章
文章詳情頁

node - 阿里ubuntu服務器,外網通過ip訪問不了的問題?

瀏覽:190日期:2024-07-04 14:16:13

問題描述

寫了個demo(node官網那段hello world),在服務器上運行無問題,curl localhost也可以返回,但外網訪問不了

const http = require(’http’)http.createServer(function(req,res){res.writeHead(200,{’Content-Type’:’text/plain’})res.end(’hello world’)}).listen(8082)console.log(’server running on http://localhost:8082’)

node - 阿里ubuntu服務器,外網通過ip訪問不了的問題?

補充:防火墻沒開node - 阿里ubuntu服務器,外網通過ip訪問不了的問題?

問題解答

回答1:

防火墻和安全組放行端口了嗎?

回答2:

iptables要開對應端口?我猜的