update httpd fragment to add in private public option

This commit is contained in:
Brian Read 2024-06-28 14:57:57 +01:00
parent c5a708a382
commit fcc2a6fce8

View File

@ -1,3 +1,14 @@
{
# mailstats
my $status = $mailstats{'Status'} || 'disabled';
if ($status eq 'enabled')
{
$OUT .="#-------------------------------------------------\n";
$OUT .="# mailstats settings from smeserver-mailstats\n";
$OUT .="#-------------------------------------------------\n";
$OUT .="\n";
$OUT .= qq(
# Alias for mailstats
Alias "/mailstats/css" "/opt/mailstats/css"
Alias "/mailstats" "/opt/mailstats/html"
@ -6,7 +17,10 @@
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
<FilesMatch .php$>
);
$OUT .= (($mailstats{access} || 'private' ) eq "public" ) ? " Require all granted": " Require ip $localAccess $externalSSLAccess";
$OUT .= qq(
<FilesMatch .php\$\>
SetHandler "proxy:unix:/var/run/php-fpm/php74.sock|fcgi://localhost"
</FilesMatch>
</Directory>
@ -15,3 +29,12 @@
AllowOverride None
Require all granted
</Directory>
);
}
else
{
$OUT .= "# mailstats is disabled";
}
}