wiki:RunOnApache2

Configuring Apache2 mod_uwsgi (updated to 0.9.4 release)

The mod_uwsgi for apache2 can be used in two way, the "assbackwards" way (the default one) that is the fastest but a bit far from apache2 API and the "cgi" mode, that is a bit slower but integrated perfectly in apache2.

If you do not use apache2 filters (included the gzip one) for content generated by uWSGI use the "assbackwards" one, otherwise use the "cgi" mode passing -C to the uWSGI server.

Options

All of the options can be set per host or per location

uWSGIsocket Absolute path and optional timeout in seconds of uwsgi server socket

uWSGIsocket2 Absolute path of failover uwsgi server socket

uWSGImodifier1 Set uWSGI modifier1

uWSGImodifier2 Set uWSGI modifier2

uWSGIforceScriptName Force SCRIPT_NAME (app name)

uWSGIforceCGImode Force uWSGI CGI mode for perfect integration with apache filters

uWSGIforceWSGIscheme Force the WSGI scheme var (set by default to "http")

uWSGImaxVars Set the maximum allowed number of uwsgi variables (default 128)

To pass custom variables you can use the SetEnv? apache2 directive:

SetEnv UWSGI_SCRIPT yourapp