2 # Mod_python is a module that embeds the Python language interpreter
3 # within the server, allowing Apache handlers to be written in Python.
6 LoadModule python_module modules/mod_python.so
8 # Override type-map handler for /var/www/manual
9 <Directory "/var/www/manual/mod/mod_python">
11 SetHandler default-handler
15 # This will cause files beneath /var/www/html with the extension .spam
16 # to be handled by the Python script /var/www/html/eggs.py
18 #<Directory /var/www/html>
19 # AddHandler python-program .spam
23 # This will cause all requests to the /python heirachy of your
24 # webserver to be handled by the python script /path/to/myhandler.py
27 # SetHandler python-program
28 # PythonPath "sys.path + ['/path/to']"
29 # PythonHandler myhandler
32 # This will cause all requests to the /python hierachy of your
33 # webserver to be handled by mod_python's Publisher handler
34 # (see http://localhost/manual/mod/mod_python/hand-pub.html)
37 # SetHandler python-program
38 # PythonHandler mod_python.publisher
41 # This will cause the output of all requests to files beneath
42 # /var/www/html with the extension .flt to be filtered through
43 # the Python script /var/www/html/filter.py
45 #<Directory /var/www/html>
46 # PythonOutputFilter filter MYFILTER
47 # AddOutputFilter MYFILTER .flt
50 # This will enable use of "Python Server Pages", HTML pages with
51 # inline Python code which is interpreted by the server:
53 #<Directory /var/www/html>
54 # AddHandler mod_python .psp
55 # PythonHandler mod_python.psp