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 --- 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 +++ 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 @@ -0,0 +1,5 @@ +{ + $httpPort = ${'httpd-e-smith'}{TCPPort} || 80; + $httpsPort = $modSSL{TCCPort} || 443; + ""; +} 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 --- 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 +++ 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 @@ -1,5 +1,5 @@ { - my $listen_default = "Listen 0.0.0.0:80"; + my $listen_default = "Listen 0.0.0.0:$httpPort"; my $mode = $SystemMode || "serveronly"; @@ -17,6 +17,6 @@ my %ipAddresses = map { $_ => 1 } @ipAddresses; foreach my $ip (sort keys %ipAddresses) { - $OUT .= "Listen $ip:80\n"; + $OUT .= "Listen $ip:$httpPort\n"; } } 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 --- 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 +++ 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 @@ -1,5 +1,5 @@ { - my $listen_default = "Listen 0.0.0.0:443"; + my $listen_default = "Listen 0.0.0.0:$httpsPort"; my $mode = $SystemMode || "serveronly"; @@ -17,6 +17,6 @@ my %ipAddresses = map { $_ => 1 } @ipAddresses; foreach my $ip (sort keys %ipAddresses) { - $OUT .= "Listen $ip:443\n"; + $OUT .= "Listen $ip:$httpsPort\n"; } } 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 --- 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 +++ 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 @@ -25,7 +25,7 @@ ) { my $templatePath = $domain->prop('TemplatePath') || 'VirtualHosts'; - foreach my $port (qw(80 443)) + foreach my $port ($httpPort, $httpsPort) { my %virtualHost = ( ipAddress => '0.0.0.0', @@ -33,6 +33,8 @@ localAccess => $localAccess, externalSSLAccess => $externalSSLAccess, domain => $domain, + httpPort => $httpPort, + httpsPort => $httpsPort ); $OUT .= esmith::templates::processTemplate ( 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 --- 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 +++ 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 @@ -4,9 +4,9 @@ my $d = $db->get($virtualHost); my $t = $d->prop('ProxyPassTarget'); - $t =~ s|http://|https://| if ($port eq "443"); + $t =~ s|http://|https://| if ($port eq "$httpsPort"); - $OUT .= " SSLEngine On\n" if ($port eq "443"); + $OUT .= " SSLEngine On\n" if ($port eq "$httpsPort"); $OUT .= " ProxyPass / $t\n"; $OUT .= " ProxyPassReverse / $t"; } 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 --- 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 +++ 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 @@ -1,5 +1,5 @@ { - return " # skipping SSL directives\n" unless $port eq "443"; + return " # skipping SSL directives\n" unless $port eq "$httpsPort"; return "" unless $modSSL{'status'} eq 'enabled';