Thank you for your incredibly quick response. I found the problem, after reading what you said and thinking about it more.
/usr/local/lib/python2.6/site-packages/django was a symlink to a django-trunk directory in /home/myuser/ obviously, other users cannot read or search for files in that users home directory. Buy myuser could; that is why it worked for user=myuser and that is why wsgi scripts not importing django would work as well. I changed /usr/loca/lib/python2.6/site-packages/django to a hard copy of the contents of django-trunk. On Dec 26, 1:56 am, Graham Dumpleton <[email protected]> wrote: > 2009/12/26 stuntgoat <[email protected]>: > > > > > Happy Holidays. > > > I am using Apache 2.2.14 mod_wsgi 3.1. Below I have the relevant > > apache config file and the error log. > > > If I use any other user than myuser ( which is the user that owns the > > myurl project ) I get "ImportError: No module named > > django.core.handlers.wsgi". I would like to be able to use other users > > that do not have shell access or home directories. > > > What are the files and directories that need to have permissions set > > to that of the daemonprocess user? I am assuming that this is a > > permissions problem, since when I change user=myuser in the > > WSGIDaemonProcess directive, my site works. > > > I have read: > >http://code.google.com/p/modwsgi/wiki/ApplicationIssues > > > But I do not know how to set up permissions to get my site working > > with daemon mode using other users, including the apache User- in this > > case 'beet'. > > > Any hints would be greatly appreciated. > > All I can really do is suggest you read up on how UNIX user/group > permissions work for file system access. Perhaps start with: > > http://en.wikipedia.org/wiki/File_system_permissions > > The user that applications runs as under Apache must have adequate > read/search permission to the file system directories down to where > the application and any modules it depends on are stored, as well as > having read permission to the files in the directory. If the > application needs to write data, the user that applications runs as > under Apache would also need write access to the directories where the > data needs to be written. > > Beyond that can't tell you want to do as you don't say anything about > what your directories/files permissions are set to currently. > > Graham > > > ########### > > <IfModule !mpm_netware_module> > > <IfModule !mpm_winnt_module> > > User beet > > Group beet > > </IfModule> > > </IfModule> > > > LoadModule wsgi_module /usr/local/apache2/modules/mod_wsgi.so > > WSGIPythonHome /usr/local > > > ServerLimit 16 > > StartServers 2 > > MaxClients 150 > > MinSpareThreads 25 > > MaxSpareThreads 75 > > ThreadsPerChild 25 > > > WSGISocketPrefix /var/run/wsgi > > > <VirtualHost 123.123.123.123:80> > > > ServerName myurl.com > > > DocumentRoot /var/www/myurl_htdocs/ > > > WSGIDaemonProcess myurl processes=2 threads=15 display-name=% > > {GROUP} user=beet > > WSGIProcessGroup myurl > > WSGIScriptAlias / /var/www/myurl_htdocs/myurl/apache/django.wsgi > > > <Directory /var/www/django-projects/myurl/apache> > > Options -Indexes > > Order allow,deny > > Allow from all > > </Directory> > > ################### > > > # error_log > > > [Sat Dec 26 02:31:05 2009] [notice] Apache/2.2.14 (Unix) mod_wsgi/3.1 > > Python/2.6.4 configured -- resuming normal operations > > [Sat Dec 26 02:31:05 2009] [info] Server built: Dec 24 2009 23:11:42 > > [Sat Dec 26 02:31:05 2009] [debug] worker.c(1740): AcceptMutex: > > sysvsem (default: sysvsem) > > [Sat Dec 26 02:31:05 2009] [info] mod_wsgi (pid=15262): Attach > > interpreter ''. > > [Sat Dec 26 02:31:15 2009] [error] [client 321.321.321.321] mod_wsgi > > (pid=15259): Target WSGI script '/var/www/django-projects/myurl/apache/ > > django.wsgi' cannot be loaded as Python module. > > [Sat Dec 26 02:31:15 2009] [error] [client 321.321.321.321] mod_wsgi > > (pid=15259): Exception occurred processing WSGI script '/var/www/ > > django-projects/myurl/apache/django.wsgi'. > > [Sat Dec 26 02:31:15 2009] [error] [client 321.321.321.321] Traceback > > (most recent call last): > > [Sat Dec 26 02:31:15 2009] [error] [client 321.321.321.321] File "/ > > var/www/django-projects/myurl/apache/django.wsgi", line 13, in > > <module> > > [Sat Dec 26 02:31:15 2009] [error] [client 321.321.321.321] import > > django.core.handlers.wsgi > > [Sat Dec 26 02:31:15 2009] [error] [client 321.321.321.321] > > ImportError: No module named django.core.handlers.wsgi > > > -- > > > You received this message because you are subscribed to the Google Groups > > "modwsgi" 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 > > athttp://groups.google.com/group/modwsgi?hl=en. -- You received this message because you are subscribed to the Google Groups "modwsgi" 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/modwsgi?hl=en.
