【问题标题】:How to write uwsgi ini file equivalent to a uwsgi command如何编写相当于 uwsgi 命令的 uwsgi ini 文件
【发布时间】:2014-10-10 15:10:27
【问题描述】:

我正在使用命令在 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

【问题讨论】:

  • Here 中找到了解决方案。它将被写为http = :9090。在发布问题之前不要不知道我是如何跳过它的。

标签: python uwsgi ini


【解决方案1】:

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

如果是ini格式,你只需要去掉选项前的双破折号。

【讨论】:

  • 谢谢。我在发布问题后立即找到了它。
【解决方案2】:

uwisgi.ini

stats = :1717 --stats-http

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

【讨论】:

  • 这就是我要寻找的。谢谢老兄。
猜你喜欢
  • 2014-08-09
  • 1970-01-01
  • 2017-05-14
  • 1970-01-01
  • 2011-05-08
  • 2014-02-15
  • 2011-12-22
  • 2019-11-28
  • 1970-01-01
相关资源
最近更新 更多