I personally use python 2.4 and django 1.2.2 and apache 2.2.3
Write httpd.conf section such as this:
<Location "/mysite/"> PythonPath "['/home/usr/www'] + sys.path" SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonOption django.root /mysite PythonDebug On </Location>
configurations.py path: /home/usr/www/mysite/
however it does not work, after i visit http://localhost/mysite/
ImportError: Couldn't import configurations 'mysite.settings'
i modified it, change /home/usr/www to /var/www and copy configurations.py in /var/www it really works. Why apache treat two sites in a different way?
Are you currently using SELinux? Compare the creation of
ls -laZ /var/www
ls -laZ /home/usr/www
Odds are that the home directory can't be utilized through the apache process. If this sounds like the issue, it may be solved as simply as
chcon -R --reference=/var/www /home/usr/www chmod og+x /home/usr /home/usr/www
BTW: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/ alerts that "Support for mod_python is going to be deprecated inside a future discharge of Django. If you're setting up a brand new deployment, you're strongly urged to think about using mod_wsgi or the other supported backends."
PythonPath "['/home/usr/www/mysite'] + sys.path"