27 lines
588 B
Plaintext
27 lines
588 B
Plaintext
{
|
|
use strict;
|
|
use warnings;
|
|
|
|
open(my $fh, '-|', 'httpd -v') or die $!;
|
|
while (my $line = <$fh>) {
|
|
if ($line =~ /.*Apache\/2\.2.*/) {
|
|
$OUT .= "
|
|
Alias /startpage /usr/share/startpage/assets
|
|
|
|
<Directory /usr/share/startpage/assets>
|
|
AllowOverride None
|
|
Order Allow,Deny
|
|
Allow from all
|
|
</Directory>"
|
|
} elsif ($line =~ /.*Apache\/2\.4.*/) {
|
|
$OUT .= "
|
|
Alias /startpage /usr/share/startpage/assets
|
|
|
|
<Directory /usr/share/startpage/assets>
|
|
AllowOverride None
|
|
Require all granted
|
|
</Directory>"
|
|
}
|
|
}
|
|
}
|