[mod_python] fedora vs ubuntu

Jim Gallacher jpg at jgassociates.ca
Thu Sep 28 19:14:19 EDT 2006

marinus van aswegen wrote:
> Hi, i recently upgraded from ubuntu to fc5 i noticed that the config
> setup is very different. before i hit the docs i thought id check to
> see if anyone can give me some pointers thanks

I'm not sure what you are asking here, but I'm going to assume you are 
confronted by the different layout for the apache configuration.

The apache configuration for Debian-derived systems makes use of lots of 
individual files and symbolic links.

Here are the steps, assuming you are compiling mod_python rather than 
grabbing it from the repository, and your mod_python version 3.2 or greater.

1. Untar the tarball
2. Do the configure/make/make install shuffle. Ubuntu (and debian) use 
apxs2, but configure will find it for you so you don't need to worry

$ ./configure; make; sudo make install

3. Create the module config file. (this statement should all be on one 

$ sudo echo "LoadModule python_module 
/usr/lib/apache2/modules/mod_python.so" > 

3b. I like to put my other module configuration directives in 
mod_python.load as well. This is good place for things like:

PythonOption mod_python.mutex_locks 8
PythonOption mod_python.mutex_directory /var/lock/mod_python
PythonOption mod_python.future.importer *

4. Enable the module. a2enmod creates a symbolic link in 
/etc/apache2/mods-enabled. That directory is included by apache2.conf

$ sudo /usr/sbin/a2enmod mod_python.load

5. restart apache

$ sudo /etc/init.d/apache2 restart

You are now good to go. Your virtual host config files go in 
/etc/apache2/sites-available and are enabled by

$ sudo /etc/sbin/a2ensite whatever

After a while any other configuration layout just seems wrong. ;)


More information about the Mod_python mailing list