【发布时间】:2018-01-23 06:44:55
【问题描述】:
我按照指南在这里设置了我的 api:https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
效果很好,我现在可以成功地对我的 api 进行查询。我的问题是,现在我想调整我的烧瓶应用程序/api 来做一些稍微不同的事情并添加功能,但是我正在 ping 的 API 似乎是旧的,尽管我已经从我的 ssh 更新了服务器上的烧瓶 .py 文件。我尝试完成教程中的所有步骤,我得到了它,希望刷新它访问的代码,但似乎没有任何效果。我尝试过的其中一些命令是:
sudo nginx -t
sudo service nginx restart
如何执行此操作并 ping 更新的烧瓶 .py 文件?
按照nos的建议我试过了:
restart myproject
但这给出了以下错误:
restart: Rejected send message, 1 matched rules; type="method_call", sender=":1.8" (uid=1000 pid=2596 comm="restart thonapi ") interface="com.ubuntu.Upstart0_6.Job" member="Restart" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init ")
【问题讨论】:
标签: python api ubuntu nginx flask