/[smeserver]/rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0_force_ssl_to_domains.patch
ViewVC logotype

Annotation of /rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0_force_ssl_to_domains.patch

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


Revision 1.2 - (hide annotations) (download)
Sat May 3 10:56:36 2014 UTC (10 years, 1 month ago) by stephdl
Branch: MAIN
CVS Tags: e-smith-ibays-2_4_0-12_el6_sme, e-smith-ibays-2_4_0-11_el6_sme, e-smith-ibays-2_4_0-14_el6_sme, e-smith-ibays-2_4_0-13_el6_sme, HEAD
Changes since 1.1: +17 -4 lines
modified e-smith-ibays-2.4.0_force_ssl_to_domains.patch as Charlie asked in bug 8332

1 stephdl 1.1 diff -Nur e-smith-ibays-2.4.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent e-smith-ibays-2.4.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent
2     --- e-smith-ibays-2.4.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent 2014-04-17 22:34:34.354833806 +0200
3 stephdl 1.2 +++ e-smith-ibays-2.4.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent 2014-05-03 11:06:00.203134455 +0200
4     @@ -10,9 +10,18 @@
5 stephdl 1.1 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 stephdl 1.2 + if (( $port ne $SSLPort ) && ( $ssl_domain eq 'enabled'))
14     + {
15     + my $portspec = ($SSLPort eq 443) ? "" : ":$SSLPort";
16 stephdl 1.1 + $OUT .= " RewriteEngine on\n";
17 stephdl 1.2 + $OUT .= " RewriteRule ^/(/.*|\$) https://%{HTTP_HOST}${portspec}/\$1 [R,L]\n";
18 stephdl 1.1 + }
19     +
20     if ($cgiBin)
21     {
22     $OUT .= " ScriptAlias /cgi-bin $basedir/cgi-bin\n";
23 stephdl 1.2 @@ -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