mod_wsgi
mod_wsgi is an Apache module that hosts Python web applications which implement the WSGI specification (PEP 3333). It has been used in production deployments for over 15 years and continues to be actively maintained.
mod_wsgi requires Python 3.10 or later and Apache 2.4. It is regularly used on Linux and macOS; Windows support under the 6.x line is provisional — see Project Status for details.
Two ways to use mod_wsgi
As a traditional Apache module loaded into an existing Apache installation. You configure Apache by hand to load the module and route requests to your WSGI application. The module itself can be built from source or, on Linux, installed from a distribution package (deb/rpm) where one is available. See Installation.
As mod_wsgi-express, a pip-installable Python package that wraps Apache and mod_wsgi behind a single command and generates the Apache configuration for you. This is the recommended path for Docker containers and for running mod_wsgi during development. See Running mod_wsgi-express.
Both approaches are suitable for production use.
Where to start
Want background on how mod_wsgi works with Apache and the common deployment shapes? See How mod_wsgi Works.
New to mod_wsgi? Start with Getting Started.
Already running Apache and want to add WSGI support? See Installation and the Quick Configuration Guide.
Want a live monitoring UI alongside your mod_wsgi install? See The External Telemetry Service, which uses the separately distributed
mod_wsgi-telemetryingester on PyPI.Curious about per-interpreter GIL or free-threaded Python (PEP 684, PEP 703)? See GIL Modes and Free-Threading.
Looking up a specific
WSGIxxxdirective? See Configuration.Saw a
WSGI####error code in your logs? See Error Reference.Stuck or have a question? See Troubleshooting and Finding Help.
Want to learn more about other things mod_wsgi offers or can do? See the User Guides.
Getting started
Reference
Help and community
Releases