1 |
diff -Nur e-smith-manager-2.8.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass e-smith-manager-2.8.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass |
2 |
--- e-smith-manager-2.8.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass 2020-06-27 14:22:39.976000000 -0400 |
3 |
+++ e-smith-manager-2.8.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass 2020-06-27 14:23:18.235000000 -0400 |
4 |
@@ -3,18 +3,16 @@ |
5 |
|
6 |
$haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; |
7 |
$plainTextAccess = ${'httpd-admin'}{PermitPlainTextAccess} || 'no'; |
8 |
- $plainPort = ${'httpd-e-smith'}{TCPPort} || '80'; |
9 |
- $sslPort = ${modSSL}{TCPPort} || '443'; |
10 |
|
11 |
$OUT = ''; |
12 |
foreach $place ('server-manager','server-common','user-password') |
13 |
{ |
14 |
- if (($port eq $plainPort) && ($haveSSL eq 'yes') && ($plainTextAccess ne 'yes')) |
15 |
+ if (($port eq $httpPort) && ($haveSSL eq 'yes') && ($plainTextAccess ne 'yes')) |
16 |
{ |
17 |
$OUT .= ' RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$' . "\n"; |
18 |
$OUT .= " RewriteRule ^/$place(/.*|\$) https://%{HTTP_HOST}/$place\$1 [L,R]\n"; |
19 |
} |
20 |
- if ($port eq $sslPort) |
21 |
+ if ($port eq $httpsPort) |
22 |
{ |
23 |
# mod_auth_tkt needs to know the protocol to write 307 redirection |
24 |
$OUT .= " RequestHeader set X-Forwarded-Proto \"https\"\n"; |
25 |
@@ -25,11 +23,11 @@ |
26 |
$OUT .= " <Location /$place>\n"; |
27 |
$OUT .= " order deny,allow\n"; |
28 |
$OUT .= " deny from all\n"; |
29 |
- if ($port eq $plainPort) |
30 |
+ if ($port eq $httpPort) |
31 |
{ |
32 |
$OUT .= ' allow from 127.0.0.1' . "\n"; |
33 |
} |
34 |
- elsif (($haveSSL eq 'yes') && (($port eq $sslPort) || ($plainTextAccess ne 'yes'))) |
35 |
+ elsif (($haveSSL eq 'yes') && (($port eq $httpsPort) || ($plainTextAccess ne 'yes'))) |
36 |
{ |
37 |
$OUT .= " allow from $localAccess $externalSSLAccess\n"; |
38 |
} else { |