On Nov 18, 2007 11:29 AM, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
>
> On Nov 18, 2:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > Thanks for the help.  I didn't think about checking permissions.  I
> > have the site working now and I think it was a combination of
> > permissions and file paths.  Here's the httpd.conf file that works:
> >
> > <VirtualHost *:80>
> >         ServerName      music.sensiblestaffing.com
> >         DocumentRoot    /home/published/www/django/
> >         SetHandler      python-program
> >         PythonHandler   django.core.handlers.modpython
> >         PythonDebug     On
> >         PythonPath      "['/home/published/www/django', '/home/
> > published/www/django/musicshare', '/usr/lib/python2.5'] + sys.path"
> >         SetEnv          DJANGO_SETTINGS_MODULE musicshare.settings
> > </VirtualHost>
> >
> > In PythonPath, removing the trailing slash seemed to correct the last
> > issue I had.  I also noticed that www-data must be the owner of the
> > files with 755 permissions.  It also helped to remove all of the .pyc
> > files before restarting apache.
>
> A trailing slash on entries in PythonPath shouldn't really have made a
> difference. A concern though is why you have /usr/lib/python2.5 listed
> in PythonPath as it shouldn't be required and could cause problems if
> that isn't actually the version of Python that mod_python was compiled
> for.
>
> Also, www-data doesn't need to be the owner of any files provided that
> files were readable to other (o+r) and directories were readable and
> searchable to others (o+rx). The only time that www-data would need to
> be owner is where it might need to modify files.

Two reasons I could think of where the same user running Apache would
have to be the owner of the files being accessed is if you are runing
a CGI script using suExec or if your Apache process needs write access
to files and directories.

As for the trailing slash, apparently some versions of Apache (1.3)
ship with a broken mod_dir that causes strange (and sometimes correct)
behavior when a trailing slash is appended to DocumentRoot. See:

http://httpd.apache.org/docs/1.3/mod/core.html#documentroot
-- 
Best Regards,
Nimrod A. Abing

W http://arsenic.ph/
W http://preownedcar.com/
W http://abing.gotdns.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to