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

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 23 Jan 2006 19:36:05 -0000


raeburn		Mon Jan 23 14:36:05 2006 EDT

  Modified files:              
    /doc/loncapafiles	webserver.piml 
  Log:
  SuSE and SLES distros were still looking for httpd.conf in /etc/httpd/conf. This should stop that.  Also SuSE/SLES were finding DocumentRoot in VirtualHost and reporting spurious error.  No longer do.   
  
  
Index: doc/loncapafiles/webserver.piml
diff -u doc/loncapafiles/webserver.piml:1.18 doc/loncapafiles/webserver.piml:1.19
--- doc/loncapafiles/webserver.piml:1.18	Sun Oct  9 22:30:46 2005
+++ doc/loncapafiles/webserver.piml	Mon Jan 23 14:36:03 2006
@@ -2,7 +2,7 @@
 	"http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- webserver.piml -->
 
-<!-- $Id: webserver.piml,v 1.18 2005/10/10 02:30:46 raeburn Exp $ -->
+<!-- $Id: webserver.piml,v 1.19 2006/01/23 19:36:03 raeburn Exp $ -->
 
 <!--
 
@@ -49,7 +49,7 @@
 <dependencies dist='default'>
 /etc/httpd/conf/httpd.conf
 </dependencies>
-<perlscript mode='fg'>
+<perlscript mode='fg' dist="default">
 # Generated from doc/loncapafiles/webserver.piml
 unless (-e "<TARGET />") {
   print '**** ERROR! /etc/httpd/conf/httpd.conf should exist! Are you missing the Apache '.
@@ -125,6 +125,8 @@
   }
 }
 </perlscript>
+<perlscript mode='fg' dist="suse9.2 suse9.3 sles9">
+</perlscript>
 <target dist='suse9.2 suse9.3 sles9'>/etc/httpd/httpd.conf</target>
 <note>This is for Apache 1.X for SuSE distributions</note>
 <dependencies dist='suse9.2 suse9.3 sles9'>
@@ -179,18 +181,27 @@
   $documentroot_flag=0;
   my $scriptalias;
   my $documentroot;
+  my $virtualhost = 0;
   open(IN,'&lt;<TARGET />');
-  while (&lt;IN&gt;) { 
+  while (&lt;IN&gt;) {
     if (m!^\s*ScriptAlias\s+/cgi-bin/\s+(.*)$!) {
       $scriptalias = $1;
       if ($scriptalias !~ m!home/httpd/cgi-bin!) {
 	$scriptalias_flag = 1;
       }
     }
+    if (m!^&lt;VirtualHost[^&gt;]*&gt;\s*$!) {
+        $virtualhost = 1;
+    }
+    if (m!^&lt;/VirtualHost&gt;\s*$!) {
+        $virtualhost = 0;
+    }  
     if (m!^\s*DocumentRoot\s+(.*)$!) {
       $documentroot = $1;
       if ($documentroot !~ m!home/httpd/html!) {
-	$documentroot_flag = 1;
+        if (!$virtualhost) {
+	    $documentroot_flag = 1;
+        }
       }
     }
   }