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 |
|