[mod_python] Access to apache namespace in PythonPath

Michael C. Neel neel at mediapulse.com
Mon Nov 10 16:49:41 EST 2003


> I'm concerned with ServerRoot, not DocumentRoot.  I don't store my 
> mod_python code in the static file store.
> 
Now I am lost, wouldn't ServerRoot always be the same?  Apache only
allows this directive once, so I'm missing the dynamic part.  Do you
have each developer running his own apache on a different port, in a
different directory?

> The mere fact that we can do suboptimal things with 
> technology shouldn't 
> preclude its availability.
> 
I used to think that, and wrote a lot of perl - I'm glad I stopped =p.
If you really want this, look into mod_perl and/or mod_macro, both of
which should be able to do what you are looking for - though I freely
admit I'm not sure what you are needing.  Perl looks something like:

  <Perl>
  
  $Location{"/~dougm/"} = {
    AuthUserFile => '/tmp/htpasswd',
    AuthType => 'Basic',
    AuthName => 'test',
    DirectoryIndex => [qw(index.html index.htm)],
    Limit => {
      METHODS => 'GET POST',
      require => 'user dougm',
    },
  };
  
  </Perl>

	If you want a more detailed example, search for conf file from a
Colbalt system, which configured everything based on a directory
structure including SSL.

Mike



More information about the Mod_python mailing list