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

harris41 lon-capa-cvs@mail.lon-capa.org
Tue, 07 Jan 2003 19:01:58 -0000


harris41		Tue Jan  7 14:01:58 2003 EDT

  Modified files:              
    /doc/loncapafiles	webserver.piml 
  Log:
  BUG 798 FIXED.  access.conf and srm.conf no longer dealt with.
  (It used to be that older versions of Apache would read access.conf
  and srm.conf even if they were not included in httpd.conf; hence
  loncapa_apache.conf inclusion testing had to be performed on these files.)
  
  
Index: doc/loncapafiles/webserver.piml
diff -u doc/loncapafiles/webserver.piml:1.11 doc/loncapafiles/webserver.piml:1.12
--- doc/loncapafiles/webserver.piml:1.11	Wed May 15 21:22:38 2002
+++ doc/loncapafiles/webserver.piml	Tue Jan  7 14:01:58 2003
@@ -3,7 +3,7 @@
 <!-- webserver.piml -->
 <!-- Scott Harrison -->
 
-<!-- $Id: webserver.piml,v 1.11 2002/05/16 01:22:38 harris41 Exp $ -->
+<!-- $Id: webserver.piml,v 1.12 2003/01/07 19:01:58 harris41 Exp $ -->
 
 <!--
 
@@ -58,25 +58,7 @@
   exit(1);
 }
 else {
-  $flag=0;
-  open IN, "&lt;<TARGET />";
-  while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/srm.conf/) { $flag=1; } }
-  close IN;
-  if ($flag!=1 and -e '/etc/httpd/conf/srm.conf') {
-    open OUT,"&gt;&gt;<TARGET />";
-    print OUT 'Include conf/srm.conf'."\n";
-    close OUT;
-  }
-  $flag=0;
-  open IN, "&lt;<TARGET />";
-  while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/access.conf/) { $flag=1; } }
-  close IN;
-  if ($flag!=1 and -e '/etc/httpd/conf/access.conf') {
-    open(OUT,'&gt;&gt;<TARGET />');
-    print(OUT 'Include conf/access.conf'."\n");
-    close(OUT);
-  }
-  my $eflag=0;
+  # Append loncapa_apache.conf inclusion to httpd.conf if not present.
   $flag=0;
   open(IN,'&lt;<TARGET />');
   while (&lt;IN&gt;) { 
@@ -90,90 +72,7 @@
     print(OUT 'Include conf/loncapa_apache.conf'."\n");
     close(OUT);
   }
-  $flag=0;
-  open(IN,'&lt;<TARGET />');
-  while (&lt;IN&gt;) {
-    if (/^\s*Include\s+conf\/loncapa.conf/) {
-      $flag=1;
-    }
-  }
-  close(IN);
-  $in='';
-  if ($flag==1) {
-    open(IN,'&lt;<TARGET />');
-    while(&lt;IN&gt;) {
-      $in.=$_ unless /^\s*Include\s+conf\/loncapa.conf/;
-    }
-    close(IN);
-    open(OUT,'&gt;<TARGET />');
-    print(OUT $in."\n");
-    close(OUT);
-  }
-}
-</perlscript>
-</file>
-<file>
-<target dist='default'>/etc/httpd/conf/access.conf</target>
-<note>This may or may not exist on a system depending on the version of
-Apache</note>
-<dependencies dist='default'>
-/etc/httpd/conf/access.conf
-</dependencies>
-<perlscript mode='fg'>
-if (-e '<TARGET />') {
-  my $flag=0;
-  open(IN,'&lt;<TARGET />');
-  while (&lt;IN&gt;) {
-    if (/^\s*Include\s+conf\/loncapa_apache.conf/) {
-      $flag=1;
-    }
-  }
-  close(IN);
-  unless ($flag==1) {
-    open(OUT,'&gt;&gt;<TARGET />');
-    print(OUT 'Include conf/loncapa_apache.conf'."\n");
-    close(OUT);
-  }
-  $flag=0;
-  open(IN,'&lt;<TARGET />');
-  while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa.conf/) { $flag=1; } }
-  close(IN);
-  $in='';
-  if ($flag==1) {
-    open(IN,'&lt;<TARGET />');
-    while(&lt;IN&gt;) {
-      $in.=$_ unless /^\s*Include\s+conf\/loncapa.conf/;
-    }
-    close(IN);
-    open(OUT,'&gt;<TARGET />');
-    print(OUT $in."\n");
-    close(OUT);
-  }
-}
-</perlscript>
-</file>
-<file>
-<target dist='default'>/etc/httpd/conf/srm.conf</target>
-<note>This may or may not exist on a system depending on the version of
-Apache</note>
-<dependencies dist='default'>
-/etc/httpd/conf/srm.conf
-</dependencies>
-<perlscript mode='fg'>
-if (-e '<TARGET />') {
-  my $flag=0;
-  open(IN,'&lt;<TARGET />');
-  while (&lt;IN&gt;) {
-    if (/^\s*Include\s+conf\/loncapa_apache.conf/) {
-      $flag=1;
-    }
-  }
-  close(IN);
-  unless ($flag==1) {
-    open(OUT,'&gt;&gt;<TARGET />');
-    print(OUT 'Include conf/loncapa_apache.conf'."\n");
-    close(OUT);
-  }
+  # Remove loncapa.conf inclusion from httpd.conf if present.
   $flag=0;
   open(IN,'&lt;<TARGET />');
   while (&lt;IN&gt;) {