1 |
vip-ire |
1.1 |
diff -Nur e-smith-manager-2.4.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass e-smith-manager-2.4.0_bz9163/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass |
2 |
|
|
--- e-smith-manager-2.4.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass 2007-01-27 02:51:30.000000000 +0100 |
3 |
|
|
+++ e-smith-manager-2.4.0_bz9163/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass 2016-01-06 16:00:49.100684723 +0100 |
4 |
|
|
@@ -3,22 +3,28 @@ |
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 "80") && ($haveSSL eq 'yes') && ($plainTextAccess ne 'yes')) |
15 |
|
|
+ if (($port eq $plainPort) && ($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 |
|
|
- } else { |
20 |
|
|
- $OUT .= " ProxyPass /$place http://127.0.0.1:${'httpd-admin'}{TCPPort}/$place\n"; |
21 |
|
|
- $OUT .= " ProxyPassReverse /$place http://127.0.0.1:${'httpd-admin'}{TCPPort}/$place\n"; |
22 |
|
|
} |
23 |
|
|
+ $OUT .= " ProxyPass /$place http://127.0.0.1:${'httpd-admin'}{TCPPort}/$place\n"; |
24 |
|
|
+ $OUT .= " ProxyPassReverse /$place http://127.0.0.1:${'httpd-admin'}{TCPPort}/$place\n"; |
25 |
|
|
|
26 |
|
|
$OUT .= " <Location /$place>\n"; |
27 |
|
|
$OUT .= " order deny,allow\n"; |
28 |
|
|
$OUT .= " deny from all\n"; |
29 |
|
|
- if (($haveSSL eq 'yes') && (($port eq "443") || ($plainTextAccess ne 'yes'))) |
30 |
|
|
+ if ($port eq $plainPort) |
31 |
|
|
+ { |
32 |
|
|
+ $OUT .= ' allow from 127.0.0.1' . "\n"; |
33 |
|
|
+ } |
34 |
|
|
+ elsif (($haveSSL eq 'yes') && (($port eq $sslPort) || ($plainTextAccess ne 'yes'))) |
35 |
|
|
{ |
36 |
|
|
$OUT .= " allow from $localAccess $externalSSLAccess\n"; |
37 |
|
|
} else { |