uwsgi
TLDR
Run a WSGI application with HTTP server
SYNOPSIS
uwsgi [options]
DESCRIPTION
uWSGI is an application server that implements the WSGI specification for serving Python web applications. It provides a bridge between web servers like Nginx and Python frameworks like Django, Flask, and Pyramid.
The server supports multiple protocols: HTTP for direct serving, the uwsgi binary protocol for efficient Nginx communication, and sockets for local IPC. It handles process management, load balancing, and caching.
Configuration can be provided via command-line options or INI/YAML/JSON files. The master process mode enables graceful reloading and automatic worker respawning.
PARAMETERS
--http address
Enable HTTP server on specified address:port--socket address
Bind to specified UNIX/TCP socket for uwsgi protocol--wsgi-file file
Load WSGI application from Python file--module module
Load WSGI application from specified module--master
Enable master process for managing workers--processes n
Spawn n worker processes--threads n
Run n threads per worker process--chdir path
Change to directory before loading application--virtualenv path
Use specified Python virtualenv--ini file
Load configuration from INI file--stats address
Enable stats server on specified address--chmod-socket
Set socket file permissions
CAVEATS
uWSGI has been in maintenance mode since October 2022. Consider alternatives like Gunicorn for new projects. The uwsgi protocol (lowercase) is different from the uWSGI application server. Socket permissions require careful configuration when running behind Nginx.
HISTORY
uWSGI was developed as a full-stack application server supporting multiple languages and protocols. Despite its name coming from WSGI, it expanded to support Ruby (Rack), Perl (PSGI), and other languages. The project became widely adopted for Python deployments.


