<IfDefine HAVE_PYTHON> <IfModule !mod_python.c> LoadModule python_module extramodules/mod_python.so </IfModule> </IfDefine> # NOTE: # If you get something like this in the log: # [error] (28)No space left on device: mod_python: Failed to create global mutex 145 of 256 # increase the values like this: # echo "300 90000 100 150" > /proc/sys/kernel/sem <IfModule mod_python.c> # # Mod_python is a module that embeds the Python language interpreter # within the server, allowing Apache handlers to be written in Python. # # This will cause files beneath /var/www/html with the extension .spam # to be handled by the Python script /var/www/html/eggs.py # #<Directory /var/www/html> # <IfModule mod_mime.c> # AddHandler python-program .spam # </IfModule> # PythonHandler eggs #</Directory> # This will cause all requests to the /python heirachy of your # webserver to be handled by the python script /path/to/myhandler.py # #<Location /python> # SetHandler python-program # PythonPath "sys.path + ['/path/to']" # PythonHandler myhandler #</Location> # This will cause all requests to the /python heirachy of your # webserver to be handled by mod_python's Publisher handler # (see http://localhost/manual/mod/mod_python/hand-pub.html) # #<Location /python> # SetHandler python-program # PythonHandler mod_python.publisher #</Location> </IfModule>