1 |
diff -Nur e-smith-ibays-2.2.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent e-smith-ibays-2.2.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent |
2 |
--- e-smith-ibays-2.2.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent 2014-04-17 21:23:03.165419209 +0200 |
3 |
+++ e-smith-ibays-2.2.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent 2014-05-03 11:22:20.249082740 +0200 |
4 |
@@ -10,9 +10,18 @@ |
5 |
my $ibay = $virtualHostContent; |
6 |
my $basedir = "/home/e-smith/files/ibays/$ibay"; |
7 |
my $cgiBin = $accounts->get_prop($ibay, "CgiBin") || ""; |
8 |
+ my $ssl_domain = $accounts->get_prop($ibay, 'SSL') || 'disabled'; |
9 |
|
10 |
$OUT .= " DocumentRoot $basedir/html\n"; |
11 |
|
12 |
+ my $SSLPort = $modSSL{'TCPPort'} || '443'; |
13 |
+ if (( $port ne $SSLPort ) && ( $ssl_domain eq 'enabled')) |
14 |
+ { |
15 |
+ my $portspec = ($SSLPort eq 443) ? "" : ":$SSLPort"; |
16 |
+ $OUT .= " RewriteEngine on\n"; |
17 |
+ $OUT .= " RewriteRule ^/(/.*|\$) https://%{HTTP_HOST}${portspec}/\$1 [R,L]\n"; |
18 |
+ } |
19 |
+ |
20 |
if ($cgiBin) |
21 |
{ |
22 |
$OUT .= " ScriptAlias /cgi-bin $basedir/cgi-bin\n"; |
23 |
@@ -45,8 +54,9 @@ |
24 |
my $SSLPort = $modSSL{'TCPPort'} || '443'; |
25 |
|
26 |
if (( $port ne $SSLPort ) && (($ibay->prop('SSL') || 'disabled') eq 'enabled')){ |
27 |
+ my $portspec = ($SSLPort eq 443) ? "" : ":$SSLPort"; |
28 |
$OUT .= " RewriteEngine on\n"; |
29 |
- $OUT .= " RewriteRule ^/$key(/.*|\$) https://%{HTTP_HOST}/$key\$1 \[L,R\]\n"; |
30 |
+ $OUT .= " RewriteRule ^/$key(/.*|\$) https://%{HTTP_HOST}${portspec}/$key\$1 \[L,R\]\n"; |
31 |
} |
32 |
if ($cgiBin) |
33 |
{ |