[LON-CAPA-cvs] cvs: doc(version_2_11_X) /loncapafiles webserver.piml

raeburn raeburn at source.lon-capa.org
Sun Sep 6 17:51:19 EDT 2020


raeburn		Sun Sep  6 21:51:19 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /doc/loncapafiles	webserver.piml 
  Log:
  - For 2.11
    Backport 1.54
  
  
Index: doc/loncapafiles/webserver.piml
diff -u doc/loncapafiles/webserver.piml:1.43.2.7 doc/loncapafiles/webserver.piml:1.43.2.8
--- doc/loncapafiles/webserver.piml:1.43.2.7	Sun Sep  6 19:29:00 2020
+++ doc/loncapafiles/webserver.piml	Sun Sep  6 21:51:19 2020
@@ -2,7 +2,7 @@
 	"http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- webserver.piml -->
 
-<!-- $Id: webserver.piml,v 1.43.2.7 2020/09/06 19:29:00 raeburn Exp $ -->
+<!-- $Id: webserver.piml,v 1.43.2.8 2020/09/06 21:51:19 raeburn Exp $ -->
 
 <!--
 
@@ -245,7 +245,8 @@
                 my @rewrites;
                 if (opendir(my $dir,$ssldir)) {
                     my @sslconf_files;
-                    foreach my $file (!grep(/^\.$/,readdir($dir))) {
+                    foreach my $file (grep(!/^\./,readdir($dir))) {
+                        next if ($file =~ /\.rpmnew$/);
                         if (open(my $fh,'<',"$ssldir/$file")) {
                             while (<$fh>) {
                                 if (/^\s*<VirtualHost\s+[^:]*\:443>\s*$/) {
@@ -257,18 +258,17 @@
                         }
                     }
                     if (@sslconf_files) {
-                        my @rewrites;
                         foreach my $file (@sslconf_files) {
                             if (open(my $fh,'<',"$ssldir/$file")) {
                                 my ($rewrite,$num) = (0,0);
                                 while (<$fh>) {
                                     if ($rewrite) {
-                                        if (/\s*<\/IfModule>/) {
+                                        if (/^\s*<\/IfModule>/) {
                                             $rewrite = 0;
                                             $num ++;
                                         } else {
                                             chomp();
-                                            s/^(\s+|\s+)$//g;
+                                            s/^\s+|\s+$//g;
                                             push(@{$rewrites[$num]},$_);
                                         }
                                     } elsif (/^\s*<IfModule\s+mod_rewrite.c>/) {
@@ -293,7 +293,7 @@
                                     }
                                 }
                             }
-                            if ($found >= @expected) {
+                            if ($found >= scalar(@expected)) {
                                 $gotrules = 1;
                                 last;
                             }




More information about the LON-CAPA-cvs mailing list