List Info

Thread: Internal Server Error (Apache+mod_python) - why?




Internal Server Error (Apache+mod_python) - why?
user name
2007-01-28 16:01:41
Hi there

I tried to install mod_python according to this installation
guide:
http://www.djangoproject.com/documentation/modpython/

However, I get a "Internal Server Error (500)"
when calling my url. I 
do _not_ get any feedback in _any_ apache log file! What
could be the 
cause?

My System: Debian Sarge + Apache 2 + Python 2.3 +
mod_python

I created a "django" user on my linux system. The
django code resides 
in a directory in this users homedirectory:

/home/django/django_src (svn checkout of django)
/home/django/projects (root of all my django projects)

Example:
/home/django/projects/djangotest (a test site)
/home/django/projects/djangotest/urls.py
/home/django/projects/djangotest/settings.py
... (etc)

My Apache-Config looks like this:

<Location "/djangotest/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    PythonPath "['/home/django/projects/djangotest'] +
sys.path"
    SetEnv DJANGO_SETTINGS_MODULE
/home/django/projects/djangotest/
settings.py
    PythonInterpreter djangotest
    PythonDebug On
</Location>

I call http://myvirtualh
ost/djangotest/now (1st example in 
djangobook.com)

When I am trying the same example with the django internal
development 
server (manage.py runserver), it works fine!!!

Any ideas?

Are there any file permission issues I have to be aware?
Currently, 
all files belong to my "django" user, but all
files are readable by 
all users (including www-data). Why am I getting no feedback
in any 
error log?

I would appreciate any hints. Thank you.


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


Re: Internal Server Error (Apache+mod_python) - why?
user name
2007-01-29 09:27:01
I'm stumped.  You definitely want the Python dotted-path
notation in 
the SetEnv for DJANGO_SETTINGS_MODULE, but even using the
wrong value 
there doesn't produce a 500 on my apache2.  I get a
PythonHandler 
traceback page showing me that django can't find my settings
file 
(and this is also logged in my error.log)  Removing the
django code 
from the Python path results in a similar traceback error,
and trying 
to start apache2 with no mod_python enabled simply fails and
I can't 
connect to the server at all.  So I'm at a loss to explain
what could 
cause the 500 with no errors in your logs....whatever it is
it would 
seem to be something very low-level, since it apparently
prevents the 
normal error-reporting code from doing its job.  Sorry I
can't be more helpful,

Karen


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


Re: Internal Server Error (Apache+mod_python) - why?
user name
2007-01-29 11:45:24
Well, at least I got it working today  Still dont
know what was wrong, but
after some fiddling it started working  



-- 
Mvh
Kristian Klette
«Programs for sale: Fast, Reliable, Cheap: choose two.»

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


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )