diff -Nur --no-dereference smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd
--- smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd 2022-07-25 21:40:48.277000000 -0400
+++ smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd 2022-07-25 22:00:25.314000000 -0400
@@ -5,8 +5,7 @@
$OUT = "";
my $pass = 0;
- my $allow = $localAccess;
- my $satisfy = 'all';
+ my $allow = "ip $localAccess";
my $name = $bandwidthd{'Name'} || 'Application bandwidthd Login';
my $webinterface = $bandwidthd{'webinterface'} || 'both';
$version = "74"; #temp bjr 30nov2020
@@ -17,26 +16,22 @@
{
if ($bandwidthd{'webaccess'} eq 'private')
{
- $allow = $localAccess;
- $satisfy = 'all';
+ $allow = "ip $localAccess $externalSSLAccess";
$pass = 1;
}
elsif ($bandwidthd{'webaccess'} eq 'local')
{
- $allow = $localAccess;
- $satisfy = 'all';
+ $allow = "ip $localAccess $externalSSLAccess";
$pass = 0;
}
elsif ($bandwidthd{'webaccess'} eq 'public')
{
- $allow = 'all';
- $satisfy = 'all';
+ $allow = 'all granted';
$pass = 1;
}
elsif ($bandwidthd{'webaccess'} eq 'global')
{
- $allow = 'all';
- $satisfy = 'all';
+ $allow = 'all granted';
$pass = 0;
}
}
@@ -60,27 +55,23 @@
$OUT .= "\n";
$OUT .= "\n";
$OUT .= " AddType application/x-httpd-php .php .conf\n";
-
- #$OUT .= " AddType application/x-httpd-php .php .conf\n";
- #$OUT .= " php_admin_value open_basedir /var/www/bandwidthd/htdocs\n";
$OUT .= "\n";
$OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n";
$OUT .= "\n";
$OUT .= " Options None\n";
- $OUT .= " order deny,allow\n";
- $OUT .= " deny from all\n";
- $OUT .= " allow from $allow\n";
if ($pass)
{
$OUT .= " AuthName \"$name\"\n";
- $OUT .= " AuthBasicProvider external\n";
+ $OUT .= " AuthBasicProvider external\n";
$OUT .= " AuthType Basic\n";
$OUT .= " AuthExternal pwauth\n";
- $OUT .= " require user admin\n";
- $OUT .= " Satisfy $satisfy\n";
}
+ $OUT .= " \n";
+ $OUT .= " require user admin\n" if ($pass);
+ $OUT .= " Require $allow\n";
+ $OUT .= " \n";
$OUT .= "\n";
}
@@ -102,28 +93,23 @@
$OUT .= "\n";
$OUT .= "\n";
- #$OUT .= " AddType application/x-httpd-php .php .conf\n";
- #$OUT .= " php_admin_value open_basedir /var/www/bandwidthd/htdocs\n";
-
$OUT .= "\n";
$OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n";
$OUT .= "\n";
-
$OUT .= " SSLRequireSSL\n";
$OUT .= " Options None\n";
- $OUT .= " order deny,allow\n";
- $OUT .= " deny from all\n";
- $OUT .= " allow from $allow\n";
if ($pass)
{
$OUT .= " AuthName \"$name\"\n";
- $OUT .= " AuthBasicProvider external\n";
+ $OUT .= " AuthBasicProvider external\n";
$OUT .= " AuthType Basic\n";
$OUT .= " AuthExternal pwauth\n";
- $OUT .= " require user admin\n";
- $OUT .= " Satisfy $satisfy\n";
}
+ $OUT .= " \n";
+ $OUT .= " require user admin\n" if ($pass);
+ $OUT .= " Require $allow\n";
+ $OUT .= " \n";
$OUT .= "\n";
}
}