[mod_python] a way to list all namespace in apache

Graham Dumpleton graham.dumpleton at gmail.com
Thu Mar 20 00:58:55 EDT 2008

On 20/03/2008, David Bear <david.bear at asu.edu> wrote:
> Its far too easy to end up with an apache config that is to complex to easily
>  understand quickly. I was wondering if there was a way using mod-python to
>  display all the name spaces that apache knows about through its config file.
>  By that I mean I would like a listing of all virtual hosts and their
>  associated document roots -- and then for each vhost a list of the rewrite
>  rules that may exist for that. I know I could always look at the config file,
>  but I'm thinking of something that would organize the rewrite rules more the
>  way apache would see them.
>  My initial thinking of having something like this would be to aid in debugging
>  some obscure reason why apache would fail to behave as expected. My first
>  experience configuring apache was using the yast, a gui configurator. But
>  yast introduced some strange stanzas that sometimes it didn't properly close
>  or nest. It would have been nice to see what apache was seeing in the
>  configuration file.

Have you tried apache.config_tree()? See description in:



More information about the Mod_python mailing list