[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Open bugs



On Sun, Feb 17, 2002 at 02:57:34AM +0800, James Bromberger wrote:
> On Sat, Feb 16, 2002 at 04:56:49AM +0000, Matthew Wilcox wrote:
> > #132062: Should be straightforward for a perl hacker
>    [ apacheconfig doesnt handle httpd.conf as a directory ]
> 
> Hmm. apacheconfig in apache-common 1.3.23-1 seems to have from line 907:
>     if (-d $file) {
>         # We have a directory, per apache docs this means that all files in
>         # this directory and below are to be parsed as configuration files.
>         foreach (`find $file -type f -print`) {
>             chomp $_;
>             $config .= read_config($_);
>         }
> 
> 
> Does this not deal with the case where $file is a directory already?

This part does, however apacheconfig generally assumes that httpd.conf
is a single file.  Some examples:

$main::httpdconf = `cat $HTTPD_CONF`;

# lots of this stuff
if ($httpdconf =~ m/(^|(?<=\n))Group.*-\d/)

# lastly
open (CONF, ">$HTTPD_CONF") || die ("couldn't open $HTTPD_CONF");
print CONF $httpdconf;
close (CONF);

Basically apacheconfig assumes that httpd.conf is a single file that
contains all the directives.  The snippet of code you included was added
so directives included into httpd.conf via Include would be noticed by
apacheconfig when determining which modules to activate.  This doesn't
change the fact that apacheconfig is basically ignorant of multiple
config files.

Given how apacheconfig works I don't see any non-trivial way to make it
do the right thing for bug #132062.

Steve Stock
steve@technolope.org



Reply to: