mod_wsgi¶
The mod_wsgi package implements a simple to use Apache module which canhost any Python web application which supports the PythonWSGIspecification. The package can be installed in two different waysdepending on your requirements.
The first is as a traditional Apache module installed into an existingApache installation. Following this path you will need to manuallyconfigure Apache to load mod_wsgi and pass through web requests to yourWSGI application.
The second way of installing mod_wsgi is to install it fromPyPI using thePythonpip command. This builds and installs mod_wsgi into your Pythoninstallation or virtual environment. The programmod_wsgi-express willthen be available, allowing you to run up Apache with mod_wsgi from thecommand line with an automatically generated configuration. Thisapproach does not require you to perform any configuration of Apacheyourself.
Both installation types are suitable for production deployments. The latterapproach usingmod_wsgi-express is the best solution if wishing to useApache and mod_wsgi within a Docker container to host your WSGI application.It is also a better choice when using mod_wsgi during the development ofyour Python web application as you will be able to run it directly fromyour terminal.