2.3.2 Configuring Apache

##
2.3.2 Configuring Apache

  LoadModule

  If you compiled mod_python as a DSO, you will need to tell Apache to load the module by adding the following line in the Apache configuration file, usually called httpd.conf or apache.conf:

          LoadModule python_module libexec/mod_python.so

  The actual path to mod_python.so may vary, but make install should report at the very end exactly where mod_python.so was placed and how the `LoadModule` directive should appear.

  Mutex Directory

  The default directory for mutex lock files is /tmp. The default value can be be specified at compile time using ./configure --with-mutex-dir.

  Alternatively this value can be overriden at apache startup using a PythonOption.

          PythonOption mod_python.mutex_directory "/tmp"

  This may only be used in the server configuration context. It will be ignored if used in a directory, virtual host, htaccess or location context. The most logical place for this directive in your apache configuration file is immediately following the LoadModule directive.

  New in version 3.3.0

  Mutex Locks

  Mutexes are used in mod_python for session locking. The default value is 8.

  On some systems the locking mechanism chosen uses valuable system resources. Notably on RH 8 sysv ipc is used, which by default provides only 128 semaphores system-wide. On many other systems flock is used which may result in a relatively large number of open files.

  The optimal number of necessary locks is not clear. Increasing the maximum number of locks may increase performance when using session locking. A reasonable number for higher performance might be 32.

  The maximum number of locks can be specified at compile time using ./configure --with-max-locks.

  Alternatively this value can be overriden at apache startup using a PythonOption.

          PythonOption mod_python.mutex_locks 8

  This may only be used in the server configuration context. It will be ignored if used in a directory, virtual host, htaccess or location context. The most logical place for this directive in your apache configuration file is immediately following the LoadModule directive.

  New in version 3.3.0