summaryrefslogtreecommitdiff
path: root/docs/config-directives/WSGICallableObject.rst
blob: 61570792cd77d561d235c884c39a49dbf2462b42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
==================
WSGICallableObject
==================

:Description: Sets the name of the WSGI application callable.
:Syntax: ``WSGICallableObject`` *name*
         ``WSGICallableObject %{ENV:variable}``
:Default: ``WSGICallableObject application``
:Context: server config, virtual host, directory, .htaccess
:Override: ``FileInfo``

The WSGICallableObject directive can be used to override the name of the
Python callable object in the script file which is used as the entry point
into the WSGI application.

When ``%{ENV}`` is being used, the environment variable is looked-up via the
internal Apache notes and subprocess environment data structures and (if
not found there) via getenv() from the Apache server process.

In an Apache configuration file, environment variables accessible using
the ``%{ENV}`` variable reference can be setup by using directives such as
`SetEnv`_ and `RewriteRule`_.

Note that the name of the callable object must be an object present at
global scope within the WSGI script file. It is not possible to use a dotted
path to refer to a sub object of a module imported by the WSGI script file.

.. _SetEnv: http://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv
.. _RewriteRule: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule