2

i have some problems getting trac to be running with apache.

have no idea of how to do and the tutorial i followed doesnt work.

http://trac.edgewall.org/wiki/TracModPython

i have an empty /etc/apache2/httpd.conf. should it be empty?

then i followed the tutorial and typed in:

LoadModule python_module modules/mod_python.so

so now it contains one row. i have ubuntu and i installed mod_python with:

apt-get install libapache2-mod-python libapache2-mod-python-doc

however, when i run a2enmod mod_python it says:

ERROR: Module mod_python does not exist!

but i have checked that it exists in /usr/lib/apache2/modules/mod_python.so.

so whats the problem?

never_had_a_name
  • 90,630
  • 105
  • 267
  • 383
  • 1
    Seems you are better off using [`mod_wsgi`](https://code.google.com/p/modwsgi/wiki/IntegrationWithTrac) now days over `mod_python`, not that the [documentation](http://trac.edgewall.org/wiki/TracInstall#WebServer) got any better. – ficuscr Sep 03 '13 at 15:06

2 Answers2

4

Usually, installing mod_python via:

apt-get install libapache2-mod-python

will enable it. If it does not, the correct command is:

a2enmod python

note, the module is 'python', not 'mod_python'.

0

First, your httpd.conf may be empty, but you should also have a apache2.conf in the same directory that actually contains all the server directives.

As for the module, I was having the same issue and then did some digging. If you look in /etc/apache2/mods-enabled, you should have one in there called "python.load" (I do at least). If you open that up with vi, you will notice the following line in that file:

LoadModule python_module /usr/lib/apache2/modules/mod_python.so

I think that it may just be that its installed with a different name. If someone else knows different, I would be interested in hearing their views as well.

Regards,

Jeff

numberwhun
  • 956
  • 9
  • 7
  • is the apache2.conf the main configuration file for apache or is it the httpd.conf? – never_had_a_name Apr 02 '10 at 15:16
  • yes i do have python.load in that folder. so what's next? how do i start trac when apache starts? and why does apache2 tell me: ERROR: Module mod_python does not exist!. when i type in: a2enmod mod_python – never_had_a_name Apr 02 '10 at 15:24
  • @never_had_a_name: The command has changed from "a2enmod mod_python" to just "a2enmod python". – Leo May 10 '11 at 17:11