Skip to content

Commit

Permalink
Merge pull request #39 from rafl/master
Browse files Browse the repository at this point in the history
Process relative httpd.conf includes when probing apache2 configuration
  • Loading branch information
theory committed Feb 6, 2012
2 parents 109a8a3 + e06722a commit 70bb163
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions inst/htprobe_apache2.pl
Expand Up @@ -27,7 +27,7 @@ =head1 See Also
use FindBin; use FindBin;
use lib "$FindBin::Bin/lib"; use lib "$FindBin::Bin/lib";
use Bric::Inst qw(:all); use Bric::Inst qw(:all);
use File::Spec::Functions; use File::Spec::Functions ':ALL';
use Data::Dumper; use Data::Dumper;


# check whether questions should be asked # check whether questions should be asked
Expand Down Expand Up @@ -110,7 +110,11 @@ sub read_conf {
# (note: this is wrong in htprobe_apache.pl, where I left it alone.) # (note: this is wrong in htprobe_apache.pl, where I left it alone.)
my $included = ''; my $included = '';
while ($AP{conf} =~ /^\s*Include\s+(.+)$/gim) { while ($AP{conf} =~ /^\s*Include\s+(.+)$/gim) {
$included .= "\n" . slurp_conf($1); $included .= "\n" . slurp_conf(
file_name_is_absolute($1)
? $1
: rel2abs($1, $AP{HTTPD_ROOT})
);
} }
$AP{conf} .= $included; $AP{conf} .= $included;
} }
Expand Down

0 comments on commit 70bb163

Please sign in to comment.