You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by David Fraser <da...@sjsoft.com> on 2004/07/07 11:51:39 UTC

Editing Apache configuration files

Hi

I've made a stab at automatically editing the Apache httpd.conf file.
The purpose of this was to allow the mod_python installer on Windows to 
automatically add the LoadPython etc lines to the configuration file.
The module I have made also allows slightly more complex changes such as 
moving DocumentRoots, changing permissions etc.
We also use this to (at user request) make required changes to 
httpd.conf for our application

I wonder whether this would be suitable for inclusion in mod_python 
generally ...

If anyone is interested I'll post the code (apacheconf.py in 
lib/python/mod_python, its 294 lines long, and mods to win32_postinstall.py)

Cheers
David


Re: Editing Apache configuration files

Posted by David Fraser <da...@sjsoft.com>.
I had seen that and forgotten about it :-)
Actually they're fairly different in that the stuff in the test 
directory can only be used to assemble new http conf files.
What my code does is parse existing httpd.conf files and modify them (or 
report if it finds a problem along the way).
So that, for example, the instructions in the windows install become a 
lot simpler (all the required modifications are done automatically, even 
if the user has modified their httpd.conf file)
But it may be that a combined module that can do both is whats really 
required

David

Gregory (Grisha) Trubetskoy wrote:

>
> Have you seen the stuff in the test directory? It might be something 
> similar...
>
> Grisha
>
> On Wed, 7 Jul 2004, David Fraser wrote:
>
>> Hi
>>
>> I've made a stab at automatically editing the Apache httpd.conf file.
>> The purpose of this was to allow the mod_python installer on Windows 
>> to automatically add the LoadPython etc lines to the configuration file.
>> The module I have made also allows slightly more complex changes such 
>> as moving DocumentRoots, changing permissions etc.
>> We also use this to (at user request) make required changes to 
>> httpd.conf for our application
>>
>> I wonder whether this would be suitable for inclusion in mod_python 
>> generally ...
>>
>> If anyone is interested I'll post the code (apacheconf.py in 
>> lib/python/mod_python, its 294 lines long, and mods to 
>> win32_postinstall.py)
>>
>> Cheers
>> David
>>
>


Re: Editing Apache configuration files

Posted by "Gregory (Grisha) Trubetskoy" <gr...@apache.org>.
Have you seen the stuff in the test directory? It might be something 
similar...

Grisha

On Wed, 7 Jul 2004, David Fraser wrote:

> Hi
>
> I've made a stab at automatically editing the Apache httpd.conf file.
> The purpose of this was to allow the mod_python installer on Windows to 
> automatically add the LoadPython etc lines to the configuration file.
> The module I have made also allows slightly more complex changes such as 
> moving DocumentRoots, changing permissions etc.
> We also use this to (at user request) make required changes to httpd.conf for 
> our application
>
> I wonder whether this would be suitable for inclusion in mod_python generally 
> ...
>
> If anyone is interested I'll post the code (apacheconf.py in 
> lib/python/mod_python, its 294 lines long, and mods to win32_postinstall.py)
>
> Cheers
> David
>