2.3.2 Configuring Apache

  • 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.

    If your Apache configuration uses ClearModuleList directive, you will need to add mod_python to the module list in the Apache configuration file:

    AddModule mod_python.c
    

    NB: Some (not all) RedHat Linux users reported that mod_python needs to be first in the module list, or Apache will crash.

  • If you used the static installation, you now need to recompile Apache:

    $ cd ../src/apache_1.3.12
    $ ./configure --activate-module=src/modules/python/libpython.a
    $ make
    

    Or, if you prefer the old "Configure" style, edit src/Configuration to have

    AddModule modules/python/libpython.a
    
    then run
    $ cd src
    $ ./Configure
    $ Make
    

What is this????