The flask project has been deployed on the cloud server but is still inaccessible.

Problem Description

Insert image description here
I ran the program on the server
but I still cannot access it through the public network IP + port number.
and through another remote connection, test tcping 公网ip 5000, display 公网ip port 5000 closed.
and write in flask code app.run(host='0.0.0.0',port=5000)

Solution

My program is flask. I should write flask run --host=0.0.0.0 --port=5000 or flask run --host=私网ip --port=5000
and then see Running on http://私网ip:5000/ in the terminal, and then I can access it.

Guess you like

Origin blog.csdn.net/qq_61786525/article/details/130310843