On Jun 20, 12:48 pm, commonzenpython <commonzenpyt...@gmail.com>
wrote:
> thanks, i have seen the error logs and it says "could not import
> settings "ash.settings" ( is it on sys path ?)"  ash is the name of my
> project, also i didnt get a 500 error this time, my website just didnt
> load, i added the following configuration to the httpd.conf :
> LoadModule wsgi_module modules/mod_wsgi.so
>
> and then i put:
>
> WSGIScriptAlias / /ash/apache/ django.wsgi  #which isn't the actual
> things i typed for security purposes but its basically the same since
> its a path to my wsgi file
>
> this is whats inside my wsgi file:
>
> import os
> import sys
> sys.path.append('PATH/ash') # again i changed the actual adress for
> security purposes but the path leads to my project called ash
> os.environ['DJANGO_SETTINGS_MODULE'] = 'ash.settings'
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()

I will state again what I said before:

"""When you do post the Apache configuration snippet, make sure you
don't
go editing it to change details. The exact information is needed else
it makes it harder to debug what you have done wrong as have to
assume
hidden information. """

The same applies to paths in the WSGI script file. You may not think
it is a big deal and think protecting your internal file system paths
is more important, even though we could never access them anyway, but
when you change information it becomes impossible to advise you on
what you have done wrong because you have changed information which is
crucial to working it out.

As to the error, this will occur for three reasons.

1. The path you added to sys.path is wrong. Since you didn't supply
correct path information cant verify this for you. It does look
however like you have added the site directory though and not the
parent.

2. You have a syntax error in your settings.py file.

3. The user that Apache runs as does have ability to read site
package, including the settings.py file.

At this point all I can suggest is you read:

  http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html

This will explain better the various issues around setting of the path
and supply an alternate WSGI script which may work better for you
given explanation of what path it tells you to use.

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-us...@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