标签:set isa host info class ocs firewall hello idt
app.py
from flask import Flask,jsonify app = Flask(__name__) app.route("/index") def index(): print("进入函数") return "hello world" if __name__ == ‘__main__‘: app.run(debug=True,host="0.0.0.0")
不能访问
原因一:防火墙未关闭
service firewalld stop 关闭防火墙
systemctl status firewall 状态为关闭状态
(flask_mini) [root@VM_0_13_centos order]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1)
原因二:云服务器的安全组,为开启5000端口
# TODO
标签:set isa host info class ocs firewall hello idt
原文地址:https://www.cnblogs.com/meloncodezhang/p/12602398.html