如何编写uwsgi ini文件相当于uwsgi命令

时间:2014-10-10 15:10:28

标签: python uwsgi ini

我正在使用命令

在uWsgi服务器上测试应用程序
uwsgi --http :9090 --wsgi-file myapp.py --callable app --processes 4 --threads 2 --stats 127.0.0.1:9191

在9090端口上启动应用程序。我想为此写一个.ini文件。但是我被--http :9090部分困住了。它将如何写在ini文件中?到目前为止,我的uwsgi.ini文件看起来像这样,

[uwsgi]
wsgi-file = myapp.py
callable = app
processes = 4
threads = 2
stats = 127.0.0.1:9191

2 个答案:

答案 0 :(得分:4)

配置指令和命令行选项由同一解析器管理:https://uwsgi-docs.readthedocs.org/en/latest/Configuration.html

对于ini格式,您只需要在选项前删除双短划线。

答案 1 :(得分:0)

uwisgi.ini

stats = :1717 --stats-http

文档:http://uwsgi-docs.readthedocs.org/en/latest/StatsServer.html