On Aug 26, 8:38 pm, Hussein B <hubaghd...@gmail.com> wrote:
> I changed it to the following:
>
> <Location /ssh>
>         SetHandler python-program
>         PythonHandler django.core.handlers.modpython
>         SetEnv DJANGO_SETTINGS_MODULE SshConnector.settings
>         PythonPath "['/home/me/', '/home/me/SshConnector/'] +
> sys.path"
>         PythonDebug On

Now go read documentation about the django.root option required when
not mounting it at root of web site.

> </Location>
>
> I tried this URLhttp://localservler/ssh/
> But I got this error:
>
>   File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
> line 75, in __init__
>     raise ImportError, "Could not import settings '%s' (Is it on
> sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
> e)
>
> ImportError: Could not import settings 'SshConnector.settings' (Is it
> on sys.path? Does it have syntax errors?): No module named
> SshConnector.settings

This can occur because Apache normally runs as a special user and that
user will need permissions to access the files in your home account.
The error can thus indicate it doesn't have that permission.

Graham

> On Aug 26, 1:24 pm, Graham Dumpleton <graham.dumple...@gmail.com>
> wrote:
>
>
>
> > On Aug 26, 7:51 pm, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
>
> > > On Wednesday 26 Aug 2009 2:42:47 pm HB wrote:
>
> > > > Hey,
> > > > I'm trying to deploy my first Django application to Apache.
> > > > The project is located under:  /home/me/SshConnector/
> > > > Here is my configuration:
>
> > > > <Directory /var/www/html>
> > > >         Options Indexes FollowSymLinks MultiViews
> > > >         AllowOverride None
> > > >         Order allow,deny
> > > >         allow from all
> > > >         AddHandler mod_python .py
> > > >         PythonHandler mod_python.publisher
>
> > What Django installation instructions tell you to set PythonHandler to
> > mod_python.publisher? Read the Django documentation for deploying with
> > mod_python again.
>
> > > >         SetEnv DJANGO_SETTINGS_MODULE SshConnector.settings
> > > >         PythonPath "['/home/me/SshConnector/', '/var/www'] + sys.path"
>
> > > in the first place this wrong. It should be:
>
> > >  PythonPath "['/home/me/', '/var/www'] + sys.path"
>
> > No actually. The 'var/www' is likely totally unnecessary and if they
> > don't prefix project site everywhere as necessary in urls.py and in
> > imports, then you would actually want:
>
> >   PythonPath "['/home/me/', '/home/me/SshConnector/'] + sys.path"
>
> > Graham
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to