On 24 June 2010 14:50, commonzenpython <[email protected]> wrote:
> i have been reading the post, and i added
> os.environ['PYTHON_EGG_CACHE'] = '/home/ashtanga/public_html' to the
> wsgi file, and its still giving me the same error, all that changes is
> the current directory the PYTHON EGG CACHE is set to which is /home/
> ashtanga/public_html
That is a bad directory to set it to. Don't set it to a directory
which is served by Apache.
Also, the directory has to be writable by the Apache user as is
explained is the problem in the document.
The quickest solution out of this is to remove the setting of
PYTHON_EGG_CACHE and configure your application to run in mod_wsgi
daemon mode instead with same user/group as your user account runs as.
Thus something like:
WSGIDaemonProcess ash display-name=%{GROUP} user=ashtanga group=ashtanga
WSGIScriptAlias /ash /home/ashtanga/public_html/ash/apache/django.wsgi \
process-group=ash application-group=%{GLOBAL}
<Directory /home/ashtanga/public_html/ash/apache>
Order deny,allow
Allow from all
</Directory>
If you set user/group right, the egg cache will instead resolve to:
/home/ashtanga/.python-eggs
which is the same place as is used when your run Python stuff from
command line out of the account.
Doing this will likely solve a whole lot of problems you will
encounter later when you code stuff in your application that wants to
write to file system.
In other words, the Python web application will not run as you and can
write to anywhere you can.
Graham
--
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.