1 |
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 |
2 |
--- 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 |
3 |
+++ 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 |
4 |
@@ -5,8 +5,7 @@ |
5 |
|
6 |
$OUT = ""; |
7 |
my $pass = 0; |
8 |
- my $allow = $localAccess; |
9 |
- my $satisfy = 'all'; |
10 |
+ my $allow = "ip $localAccess"; |
11 |
my $name = $bandwidthd{'Name'} || 'Application bandwidthd Login'; |
12 |
my $webinterface = $bandwidthd{'webinterface'} || 'both'; |
13 |
$version = "74"; #temp bjr 30nov2020 |
14 |
@@ -17,26 +16,22 @@ |
15 |
{ |
16 |
if ($bandwidthd{'webaccess'} eq 'private') |
17 |
{ |
18 |
- $allow = $localAccess; |
19 |
- $satisfy = 'all'; |
20 |
+ $allow = "ip $localAccess $externalSSLAccess"; |
21 |
$pass = 1; |
22 |
} |
23 |
elsif ($bandwidthd{'webaccess'} eq 'local') |
24 |
{ |
25 |
- $allow = $localAccess; |
26 |
- $satisfy = 'all'; |
27 |
+ $allow = "ip $localAccess $externalSSLAccess"; |
28 |
$pass = 0; |
29 |
} |
30 |
elsif ($bandwidthd{'webaccess'} eq 'public') |
31 |
{ |
32 |
- $allow = 'all'; |
33 |
- $satisfy = 'all'; |
34 |
+ $allow = 'all granted'; |
35 |
$pass = 1; |
36 |
} |
37 |
elsif ($bandwidthd{'webaccess'} eq 'global') |
38 |
{ |
39 |
- $allow = 'all'; |
40 |
- $satisfy = 'all'; |
41 |
+ $allow = 'all granted'; |
42 |
$pass = 0; |
43 |
} |
44 |
} |
45 |
@@ -60,27 +55,23 @@ |
46 |
$OUT .= "\n"; |
47 |
$OUT .= "<Directory /var/www/bandwidthd/htdocs>\n"; |
48 |
$OUT .= " AddType application/x-httpd-php .php .conf\n"; |
49 |
- |
50 |
- #$OUT .= " AddType application/x-httpd-php .php .conf\n"; |
51 |
- #$OUT .= " php_admin_value open_basedir /var/www/bandwidthd/htdocs\n"; |
52 |
|
53 |
$OUT .= "<FilesMatch \.php\$\>\n"; |
54 |
$OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n"; |
55 |
$OUT .= "</FilesMatch>\n"; |
56 |
|
57 |
$OUT .= " Options None\n"; |
58 |
- $OUT .= " order deny,allow\n"; |
59 |
- $OUT .= " deny from all\n"; |
60 |
- $OUT .= " allow from $allow\n"; |
61 |
if ($pass) |
62 |
{ |
63 |
$OUT .= " AuthName \"$name\"\n"; |
64 |
- $OUT .= " AuthBasicProvider external\n"; |
65 |
+ $OUT .= " AuthBasicProvider external\n"; |
66 |
$OUT .= " AuthType Basic\n"; |
67 |
$OUT .= " AuthExternal pwauth\n"; |
68 |
- $OUT .= " require user admin\n"; |
69 |
- $OUT .= " Satisfy $satisfy\n"; |
70 |
} |
71 |
+ $OUT .= " <RequireAll>\n"; |
72 |
+ $OUT .= " require user admin\n" if ($pass); |
73 |
+ $OUT .= " Require $allow\n"; |
74 |
+ $OUT .= " </RequireAll>\n"; |
75 |
$OUT .= "</Directory>\n"; |
76 |
} |
77 |
|
78 |
@@ -102,28 +93,23 @@ |
79 |
$OUT .= "\n"; |
80 |
$OUT .= "<Directory /var/www/bandwidthd/phphtdocs>\n"; |
81 |
|
82 |
- #$OUT .= " AddType application/x-httpd-php .php .conf\n"; |
83 |
- #$OUT .= " php_admin_value open_basedir /var/www/bandwidthd/htdocs\n"; |
84 |
- |
85 |
$OUT .= "<FilesMatch \.php\$\>\n"; |
86 |
$OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n"; |
87 |
$OUT .= "</FilesMatch>\n"; |
88 |
|
89 |
- |
90 |
$OUT .= " SSLRequireSSL\n"; |
91 |
$OUT .= " Options None\n"; |
92 |
- $OUT .= " order deny,allow\n"; |
93 |
- $OUT .= " deny from all\n"; |
94 |
- $OUT .= " allow from $allow\n"; |
95 |
if ($pass) |
96 |
{ |
97 |
$OUT .= " AuthName \"$name\"\n"; |
98 |
- $OUT .= " AuthBasicProvider external\n"; |
99 |
+ $OUT .= " AuthBasicProvider external\n"; |
100 |
$OUT .= " AuthType Basic\n"; |
101 |
$OUT .= " AuthExternal pwauth\n"; |
102 |
- $OUT .= " require user admin\n"; |
103 |
- $OUT .= " Satisfy $satisfy\n"; |
104 |
} |
105 |
+ $OUT .= " <RequireAll>\n"; |
106 |
+ $OUT .= " require user admin\n" if ($pass); |
107 |
+ $OUT .= " Require $allow\n"; |
108 |
+ $OUT .= " </RequireAll>\n"; |
109 |
$OUT .= "</Directory>\n"; |
110 |
} |
111 |
} |