/[smeserver]/rpms/e-smith-apache/sme10/e-smith-apache-2.6.0-bz10966-remove-hardcoded-ports.patch
ViewVC logotype

Annotation of /rpms/e-smith-apache/sme10/e-smith-apache-2.6.0-bz10966-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 17:26:20 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-apache-2_6_0-20_el7_sme, e-smith-apache-2_6_0-23_el7_sme, e-smith-apache-2_6_0-21_el7_sme, e-smith-apache-2_6_0-13_el7_sme, e-smith-apache-2_6_0-9_el7_sme, e-smith-apache-2_6_0-22_el7_sme, e-smith-apache-2_6_0-19_el7_sme, e-smith-apache-2_6_0-14_el7_sme, e-smith-apache-2_6_0-18_el7_sme, e-smith-apache-2_6_0-11_el7_sme, e-smith-apache-2_6_0-17_el7_sme, e-smith-apache-2_6_0-12_el7_sme, e-smith-apache-2_6_0-15_el7_sme, e-smith-apache-2_6_0-10_el7_sme, e-smith-apache-2_6_0-16_el7_sme, HEAD
* Sat Jun 27 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-9.sme
- port 80 and 443 should not be hardcoded [SME: 9192]
- e-smith-apache removing hardcoded ports [SME: 10966]

1 jpp 1.1 diff -Nur e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/03TCPPorts e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/03TCPPorts
2     --- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/03TCPPorts 1969-12-31 19:00:00.000000000 -0500
3     +++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/03TCPPorts 2020-06-27 13:01:59.815000000 -0400
4     @@ -0,0 +1,5 @@
5     +{
6     + $httpPort = ${'httpd-e-smith'}{TCPPort} || 80;
7     + $httpsPort = $modSSL{TCCPort} || 443;
8     + "";
9     +}
10     diff -Nur e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35Listen80 e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35Listen80
11     --- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35Listen80 2006-03-14 11:47:18.000000000 -0500
12     +++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35Listen80 2020-06-27 13:01:19.212000000 -0400
13     @@ -1,5 +1,5 @@
14     {
15     - my $listen_default = "Listen 0.0.0.0:80";
16     + my $listen_default = "Listen 0.0.0.0:$httpPort";
17    
18     my $mode = $SystemMode || "serveronly";
19    
20     @@ -17,6 +17,6 @@
21     my %ipAddresses = map { $_ => 1 } @ipAddresses;
22     foreach my $ip (sort keys %ipAddresses)
23     {
24     - $OUT .= "Listen $ip:80\n";
25     + $OUT .= "Listen $ip:$httpPort\n";
26     }
27     }
28     diff -Nur e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00Listen443 e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00Listen443
29     --- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00Listen443 2006-03-14 11:47:18.000000000 -0500
30     +++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00Listen443 2020-06-27 13:01:32.660000000 -0400
31     @@ -1,5 +1,5 @@
32     {
33     - my $listen_default = "Listen 0.0.0.0:443";
34     + my $listen_default = "Listen 0.0.0.0:$httpsPort";
35    
36     my $mode = $SystemMode || "serveronly";
37    
38     @@ -17,6 +17,6 @@
39     my %ipAddresses = map { $_ => 1 } @ipAddresses;
40     foreach my $ip (sort keys %ipAddresses)
41     {
42     - $OUT .= "Listen $ip:443\n";
43     + $OUT .= "Listen $ip:$httpsPort\n";
44     }
45     }
46     diff -Nur e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHosts e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHosts
47     --- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHosts 2003-08-29 17:48:23.000000000 -0400
48     +++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHosts 2020-06-27 13:01:59.820000000 -0400
49     @@ -25,7 +25,7 @@
50     )
51     {
52     my $templatePath = $domain->prop('TemplatePath') || 'VirtualHosts';
53     - foreach my $port (qw(80 443))
54     + foreach my $port ($httpPort, $httpsPort)
55     {
56     my %virtualHost = (
57     ipAddress => '0.0.0.0',
58     @@ -33,6 +33,8 @@
59     localAccess => $localAccess,
60     externalSSLAccess => $externalSSLAccess,
61     domain => $domain,
62     + httpPort => $httpPort,
63     + httpsPort => $httpsPort
64     );
65    
66     $OUT .= esmith::templates::processTemplate (
67     diff -Nur e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/ProxyPassContent e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/ProxyPassContent
68     --- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/ProxyPassContent 2016-02-04 13:27:55.000000000 -0500
69     +++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/ProxyPassContent 2020-06-27 13:02:58.573000000 -0400
70     @@ -4,9 +4,9 @@
71     my $d = $db->get($virtualHost);
72     my $t = $d->prop('ProxyPassTarget');
73    
74     - $t =~ s|http://|https://| if ($port eq "443");
75     + $t =~ s|http://|https://| if ($port eq "$httpsPort");
76    
77     - $OUT .= " SSLEngine On\n" if ($port eq "443");
78     + $OUT .= " SSLEngine On\n" if ($port eq "$httpsPort");
79     $OUT .= " ProxyPass / $t\n";
80     $OUT .= " ProxyPassReverse / $t";
81     }
82     diff -Nur e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/25SSLDirectives e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/25SSLDirectives
83     --- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/25SSLDirectives 2003-01-24 17:51:59.000000000 -0500
84     +++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/25SSLDirectives 2020-06-27 13:02:34.121000000 -0400
85     @@ -1,5 +1,5 @@
86     {
87     - return " # skipping SSL directives\n" unless $port eq "443";
88     + return " # skipping SSL directives\n" unless $port eq "$httpsPort";
89    
90     return "" unless $modSSL{'status'} eq 'enabled';
91    

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