On Tue, Mar 31, 2009 at 9:27 AM, knight <alexar...@gmail.com> wrote: > > Hi, > > I'm trying to install my django application on CentOS 5 and I'm > getting the following error: > > ImportError: Could not import settings 'mx30.settings' (Is it on > sys.path? Does it have syntax errors?): No module named mx30.settings > > My httpd.conf looks as follows: > > Listen 80 > <Location "/peergw"> > SetHandler python-program > PythonPath "['/home/peertv', '/home/peertv/mx30', '/usr/lib/ > python2.5'] + sys.path" > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE mx30.settings > PythonOption django.root /peergw > PythonDebug On > PythonInterpreter mx30 > </Location> > > I can do python settings.py, so I don't have spelling errors. > I can import settings from shell. > I have all the permissions to mx30 directory where the settings are > located. > I tried all the things in the similar threads here. > > Can you please give me the directions where else I can look for a > solution? >
You say you have all permissions to the mx30 directory -- what about the user Apache runs as? CentOS has come up several times on this list with problems like this because it has selinux enabled by default. Thus even though the permissions at a casual glance make it appear that anyone can read/execute the Django app code, in fact selinux doesn't allow access by the Apache user. The fix is to jump through the selinux hoops to allow Apache to access the code, or move it to some place that Apache has access to already, or disable selinux. If you search this list for likely keywords like CentOS and permissions you'll probably find examples of how exactly to do each of those things. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---