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

Releases