检查TCP+80端口是否正常工作
Last updated
2023-01-28 10:34:55
{"value":"### \u539f\u56e0\u5206\u6790\n\n\u5982\u679c\u4e91\u670d\u52a1\u5668\u65e0\u6cd5\u5bf9\u5916\u63d0\u4f9bHTTP\u670d\u52a1\uff0c\u53ef\u4ee5\u6309\u4ee5\u4e0b\u601d\u8def\u68c0\u67e5Web\u670d\u52a1\u76f8\u5173\u7684\u7aef\u53e3\uff08\u9ed8\u8ba4\u4e3aTCP 80\uff09\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002\n\n1.\u5728ECS\u7ba1\u7406\u63a7\u5236\u53f0\uff0c\u786e\u8ba4\u5b89\u5168\u7ec4\u5df2\u7ecf\u653e\u884c\u8be5\u7aef\u53e3\u3002\n2.\u8fdc\u7a0b\u8fde\u63a5ECS\u4e91\u670d\u52a1\u5668\uff0c\u786e\u8ba4\u670d\u52a1\u5df2\u7ecf\u5f00\u542f\u3002\n3.\u786e\u8ba4\u7aef\u53e3\u6b63\u5e38\u88ab\u76d1\u542c\u3002\u5982\u6ca1\u6709\uff0c\u8bf7\u4fee\u6539\u76d1\u542c\u5730\u5740\u3002\n4.\u786e\u8ba4\u9632\u706b\u5899\u5df2\u7ecf\u653e\u884c\u670d\u52a1\u3002\n5.\u82e5\u4ecd\u65e0\u6cd5\u89e3\u51b3\uff0c\u8bf7\u63d0\u4ea4\u5de5\u5355\u54a8\u8be2\u3002\n\n### \u89e3\u51b3\u65b9\u6cd5\n\n**\u4ee5\u4e0b\u662f\u4ee5CentOS 7.8\u7cfb\u7edf\u4e3a\u4f8b\u68c0\u67e5TCP 80\u7aef\u53e3\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u7684\u65b9\u6cd5\u3002**\n\n1.\u767b\u5f55CDNCloud\u63a7\u5236\u53f0\uff0c\u786e\u8ba4\u5b89\u5168\u7ec4\u4e2d80\u7aef\u53e3\u5df2\u653e\u884c\uff0c\u6216\u8005\u662f\u672a\u8bbe\u7f6e\u5b89\u5168\u7ec4\u3002\n\n2.\u4ee5\u5b89\u88c5nginx\u4e3a\u4f8b\uff0c\u68c0\u67e5\u670d\u52a1\u662f\u5426\u5f00\u542f\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u3002\n\n systemctl status nginx\n\n\u5982\u679c\u7cfb\u7edf\u8fd4\u56de\u4e2dActive\u51fa\u73b0\u5982\u4e0b\u7ed3\u679c,\u5219\u8bf4\u660enginx\u5df2\u7ecf\u542f\u52a8\u3002\u5982\u679c\u672a\u5f00\u542f\uff0c\u5219\u6267\u884csystemctl start nginx\u547d\u4ee4\u3002\n\n Active: active (running)\n\n3.\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u67e5\u770b\u7aef\u53e3\u5728\u5b9e\u4f8b\u4e2d\u662f\u5426\u6b63\u5e38\u88ab\u76d1\u542c\u3002\n\n netstat -an | grep 80\n\n\u5982\u679c\u8fd4\u56de\u5982\u4e0b\u7ed3\u679c\u5219\u8bf4\u660e80\u7aef\u53e3\u6b63\u5e38\u5168\u7f51\u76d1\u542c\u3002\u5982\u679c\u8fd4\u56de\u7684\u4e0d\u662f\u4e0a\u8ff0\u7ed3\u679c\uff0c\u8bf7\u4fee\u6539\u76d1\u542c\u5730\u5740\u3002\n\n tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN \n\n4.CentOS 7\u4e4b\u540e\u7684\u7248\u672c\u9ed8\u8ba4\u5b89\u88c5Firewalld\u3002\u5982\u679c\u5df2\u7ecf\u542f\u7528firewalld.service\uff0c\u5219\u9700\u8981\u653e\u884c TCP 80 \u7aef\u53e3\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u3002\u82e5\u8fd4\u56de\u7ed3\u679c\u4e3asuccess\uff0c\u5219\u8868\u793a\u5df2\u7ecf\u653e\u884cTCP 80\u7aef\u53e3\u3002\n\n firewall-cmd --add-port=80\/tcp --permanent\n\n5.\u5b8c\u6210\u4e0a\u8ff0\u68c0\u67e5\uff0c\u5982\u679c\u4ecd\u4e0d\u80fd\u8bbf\u95ee\u5b9e\u4f8b\uff0c\u8bf7\u63d0\u4ea4\u5de5\u5355\u54a8\u8be2\u3002"}