/[smeserver]/rpms/e-smith-manager/sme10/e-smith-manager-2.8.0-bz10967-remove-hardcoded-ports.patch
ViewVC logotype

Annotation of /rpms/e-smith-manager/sme10/e-smith-manager-2.8.0-bz10967-remove-hardcoded-ports.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Jun 27 18:28:04 2020 UTC (4 years, 4 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-manager-2_8_0-33_el7_sme, e-smith-manager-2_8_0-35_el7_sme, e-smith-manager-2_8_0-37_el7_sme, e-smith-manager-2_8_0-32_el7_sme, e-smith-manager-2_8_0-34_el7_sme, e-smith-manager-2_8_0-38_el7_sme, e-smith-manager-2_8_0-31_el7_sme, e-smith-manager-2_8_0-36_el7_sme, HEAD
* Sat Jun 27 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.8.0-31.sme
- removing hardcoded ports [SME: 10967]

1 jpp 1.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 {

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed