salmanwahed
salmanwahed

Reputation: 9657

How to write uwsgi ini file equivalent to a uwsgi command

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

Upvotes: 2

Views: 12233

Answers (3)

Ritsard
Ritsard

Reputation: 61

This worked for me:

stats = 0.0.0.0:6000
stats-http = true

Upvotes: 0

David Dehghan
David Dehghan

Reputation: 24835

uwisgi.ini

stats = :1717 --stats-http

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

Upvotes: 5

roberto
roberto

Reputation: 12953

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.

Upvotes: 5

Related Questions