[英]How to run Flask on EC2 Amazon?
我已完成所有步驟。 當我運行應用程序時,我看到控制台消息:
[ec2-user@ip publisher]$ python __init__.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 111-801-147
我的問題是如何將此腳本公開,使該用戶能夠看到界面?
我有公共DNS,IPv4公共IP
我使用Cent OS
假設您的實例可以從Internet(VPC的公共子網)訪問,則使服務器偵聽0.0.0.0
。 當前,它僅偵聽本地請求。
進行更改后,而不是:
Running on http://127.0.0.1:5000/
你會看見:
Running on http://0.0.0.0:5000/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.