I have a Flask server running through port 5000, and it's fine. I can access it at http://example.com:5000
But is it possible to simply access it at http://example.com? I'm assuming that means I have to change the port from 5000 to 80. But when I try that on Flask, I get this error message when I run it.
Traceback (most recent call last):
File "xxxxxx.py", line 31, in
app.run(host="0.0.0.0", port=int("80"), debug=True)
File "/usr/local/lib/python2.6/dist-packages/flask/app.py", line 772, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.6/dist-packages/werkzeug/serving.py", line 706, in run_simple
test_socket.bind((hostname, port))
File "", line 1, in bind
socket.error: [Errno 98] Address already in use
Running lsof
最后
以上就是爱笑可乐最近收集整理的关于python怎么启动80端口,如何让Flask在80端口上运行?的全部内容,更多相关python怎么启动80端口内容请搜索靠谱客的其他文章。
发表评论 取消回复