How to write uwsgi ini file equivalent to a uwsgi command

Question:

I am testing an application in uWsgi server using the command,

uwsgi --http :9090 --wsgi-file myapp.py --callable app --processes 4 --threads 2 --stats 127.0.0.1:9191

That starts the application on 9090 port. I want to write a .ini file for this. But I am stuck with --http :9090 part. How it will be written in the ini file? So far my uwsgi.ini file looks like this,

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

||

Answers:

Configuration directives and command line options are managed by the same parser: https://uwsgi-docs.readthedocs.org/en/latest/Configuration.html

In the case of the ini format you only need to remove the double dashes before the option.

Answered By: roberto

uwisgi.ini

stats = :1717 --stats-http

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

Answered By: David Dehghan

This worked for me:

stats = 0.0.0.0:6000
stats-http = true
Answered By: Ritsard
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.