Re: django + mod_python + apache2 config problem

2009-10-19 Thread Graham Dumpleton



On Oct 19, 6:10 pm, Lars Stavholm  wrote:
> Bit of an annoying problem with apache2 + mod_python configuration.
>
> I've got my django site setup and working. When adding a 
> directive in the apache config which then includes authentication,
> the SetHandler None directive doesn't seem to work, i.e. I get a
> "Page not found" error in my django site, rather than the broswer
> login popup that I was expecting.

Why are you setting:

  SetHandler None

in the first place?

The Trac documentation does not tell you to set that directive for
'login' sub url.

See:

  http://trac.edgewall.org/wiki/TracModPython

I could try and explain why it may be getting routed to Django as a
result, but best off just fixing this mistake first and see what
happens.

The separate suggestion that PythonInterpreter is required is as far
as I can see totally irrelevant and wouldn't help.

Graham

> The django site is running (fine) as a virtual host, and within the
> virtual host I've defined...
>
> 
>   SetHandler mod_python
>   PythonInterpreter main_interpreter
>   PythonHandler trac.web.modpython_frontend
>   PythonOption TracEnv /var/trac/bfact
>   PythonOption TracParentEnv /var/trac
>   PythonOption TracUriRoot /trac
>   PythonOption PYTHON_EGG_CACHE /var/tmp
> 
>
> ...which works fine, whereas...
>
> 
>   SetHandler None
>   AuthType Digest
>   AuthName "MBF Trac"
>   AuthDigestProvider file
>   AuthUserFile /var/trac/.users
>   Require valid-user
> 
>
> ...send me back to the django application with a "Page not found" error.
>
> Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~--~~~~--~~--~--~---



Re: django + mod_python + apache2 config problem

2009-10-19 Thread Kenneth Gonsalves

On Monday 19 Oct 2009 12:40:48 pm Lars Stavholm wrote:
> 
>   SetHandler mod_python
>   PythonInterpreter main_interpreter
>   PythonHandler trac.web.modpython_frontend
>   PythonOption TracEnv /var/trac/bfact
>   PythonOption TracParentEnv /var/trac
>   PythonOption TracUriRoot /trac
>   PythonOption PYTHON_EGG_CACHE /var/tmp
> 

you would need this line:
PythonInterpreter some_name

in your location directive (some_name may be anything as long as it is 
different for django and for trac) - otherwise your pythons will get tangled 
with each other. You will find django in your trac and trac in your django.


-- 
regards
Kenneth Gonsalves
Senior Project Officer
NRC-FOSS
http://nrcfosshelpline.in/web/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~--~~~~--~~--~--~---



django + mod_python + apache2 config problem

2009-10-19 Thread Lars Stavholm

Bit of an annoying problem with apache2 + mod_python configuration.

I've got my django site setup and working. When adding a 
directive in the apache config which then includes authentication,
the SetHandler None directive doesn't seem to work, i.e. I get a
"Page not found" error in my django site, rather than the broswer
login popup that I was expecting.

The django site is running (fine) as a virtual host, and within the
virtual host I've defined...


  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnv /var/trac/bfact
  PythonOption TracParentEnv /var/trac
  PythonOption TracUriRoot /trac
  PythonOption PYTHON_EGG_CACHE /var/tmp


...which works fine, whereas...


  SetHandler None
  AuthType Digest
  AuthName "MBF Trac"
  AuthDigestProvider file
  AuthUserFile /var/trac/.users
  Require valid-user


...send me back to the django application with a "Page not found" error.

Any ideas?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~--~~~~--~~--~--~---