#!/opt/lampp/bin/perl -w #use strict; use Data::Dumper; require "startup_cfg.pl"; #print Dumper(%VirtualHost); print "RewriteLogLevel $RewriteLogLevel\n"; print "MaxClients $MaxClients\n"; for my $vhost ( keys %VirtualHost ) { foreach my $vhostdir ( $VirtualHost{$vhost} ) { foreach my $el ( @{$vhostdir} ) { print "<VirtualHost $vhost>\n"; foreach my $rec ( keys %{$el} ) { if ( $rec eq "Alias" ) { foreach my $alias ( @{$el->{$r +ec}} ) { print "\tAlias ". (joi +n "\t", @{$alias}) . "\n"; } } elsif ( $rec eq "RewriteRule" ) { foreach my $rule ( @{$el->{$re +c}} ) { print "\tRewriteRule " +. (join "\t", @{$rule}) . "\n"; } } else { print "\t$rec\t" . $el->{$rec} + . "\n"; } } print "</VirtualHost>\n"; } } } print "Timeout $Timeout\n";
In reply to Re: Getting startup_cfg.pl in httpd.conf syntax
by Plankton
in thread Getting startup_cfg.pl in httpd.conf syntax
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |