/[smeserver]/rpms/e-smith-ibays/sme8/e-smith-ibays-2.2.0_force_ssl_to_domains.patch
ViewVC logotype

Contents of /rpms/e-smith-ibays/sme8/e-smith-ibays-2.2.0_force_ssl_to_domains.patch

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


Revision 1.2 - (show annotations) (download)
Sat May 3 12:00:07 2014 UTC (10 years, 6 months ago) by stephdl
Branch: MAIN
CVS Tags: e-smith-ibays-2_2_0-16_el5_sme, e-smith-ibays-2_2_0-15_el5_sme, HEAD
Changes since 1.1: +17 -4 lines
modified e-smith-ibays-2.2.0_force_ssl_to_domains.patch for bug 8331

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 {

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