[LON-CAPA-cvs] cvs: doc /loncapafiles webserver.piml
raeburn
raeburn at source.lon-capa.org
Sun Sep 6 14:13:11 EDT 2020
raeburn Sun Sep 6 18:13:11 2020 EDT
Modified files:
/doc/loncapafiles webserver.piml
Log:
- Make check of rewrite rules for https -> http consistanet with rev. 1.2 of
doc/install/linux/sslrewrite.conf, installed by install.pl.
Index: doc/loncapafiles/webserver.piml
diff -u doc/loncapafiles/webserver.piml:1.52 doc/loncapafiles/webserver.piml:1.53
--- doc/loncapafiles/webserver.piml:1.52 Mon Feb 17 13:44:12 2020
+++ doc/loncapafiles/webserver.piml Sun Sep 6 18:13:11 2020
@@ -2,7 +2,7 @@
"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- webserver.piml -->
-<!-- $Id: webserver.piml,v 1.52 2020/02/17 13:44:12 raeburn Exp $ -->
+<!-- $Id: webserver.piml,v 1.53 2020/09/06 18:13:11 raeburn Exp $ -->
<!--
@@ -227,7 +227,9 @@
}
my $hostname = Sys::Hostname::FQDN::fqdn();
my $hostip = Socket::inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost');
- my @expected = ('RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:)',
+ my @expected = ('RewriteEngine on',
+ 'RewriteCond %{HTTPS} =on',
+ 'RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:)',
'RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)',
'RewriteRule ^/adm/wrapper/ext/(?!https:) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]',
'RewriteCond %{REMOTE_ADDR} 127.0.0.1',
@@ -283,9 +285,9 @@
foreach my $item (@rewrites) {
if (ref($item) eq 'ARRAY') {
my $found = 0;
- foreach my $item (@rewrites) {
+ foreach my $line (@{$item}) {
foreach my $match (@expected) {
- if ($match eq $item) {
+ if ($match eq $line) {
$found ++;
last;
}
@@ -293,6 +295,7 @@
}
if ($found >= @expected) {
$gotrules = 1;
+ last;
}
}
}
More information about the LON-CAPA-cvs
mailing list