File:  [LON-CAPA] / doc / loncapafiles / webserver.piml
Revision 1.9: download - view: text, annotated - select for diffs
Sun May 12 19:02:18 2002 UTC (22 years ago) by harris41
Branches: MAIN
CVS tags: HEAD
BUG 129
regarding split of loncapa.conf into
loncapa_apache.conf and loncapa.conf

    1: <!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
    2: 	"http://lpml.sourceforge.net/DTD/piml.dtd">
    3: <!-- webserver.piml -->
    4: <!-- Scott Harrison -->
    5: 
    6: <!-- $Id: webserver.piml,v 1.9 2002/05/12 19:02:18 harris41 Exp $ -->
    7: 
    8: <!--
    9: 
   10: Copyright Michigan State University Board of Trustees
   11: 
   12: This file is part of the LearningOnline Network with CAPA (LON-CAPA).
   13: 
   14: LON-CAPA is free software; you can redistribute it and/or modify
   15: it under the terms of the GNU General Public License as published by
   16: the Free Software Foundation; either version 2 of the License, or
   17: (at your option) any later version.
   18: 
   19: LON-CAPA is distributed in the hope that it will be useful,
   20: but WITHOUT ANY WARRANTY; without even the implied warranty of
   21: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   22: GNU General Public License for more details.
   23: 
   24: You should have received a copy of the GNU General Public License
   25: along with LON-CAPA; if not, write to the Free Software
   26: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   27: 
   28: /home/httpd/html/adm/gpl.txt
   29: 
   30: http://www.lon-capa.org/
   31: 
   32: -->
   33: 
   34: <!-- Default values must be defined before specific values. -->
   35: <!-- If no 'dist' attribute is specified, then it is always installed. -->
   36: <!-- If 'dist' attribute is set to  'default', then the specification. -->
   37: <!-- is accepted if an alternative distribution is not requested or not -->
   38: <!-- defined. -->
   39: 
   40: <piml>
   41: <targetroot>/</targetroot>
   42: <specialnotices>
   43: <specialnotice>
   44: </specialnotice>
   45: </specialnotices>
   46: <files>
   47: <file>
   48: <target dist='default'>/etc/httpd/conf/httpd.conf</target>
   49: <note>This is always expected for any version of Apache</note>
   50: <dependencies dist='default'>
   51: /etc/httpd/conf/httpd.conf
   52: </dependencies>
   53: <perlscript mode='fg'>
   54: unless (-e "<TARGET />") {
   55: 	print 'ERROR! httpd.conf should exist! Are you missing the Apache '.
   56: 		'software package';
   57: }
   58: else {
   59:   $flag=0;
   60:   open IN, "&lt;<TARGET />";
   61:   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/srm.conf/) { $flag=1; } }
   62:   close IN;
   63:   unless ($flag==1) {
   64: 	open OUT,"&gt;&gt;<TARGET />";
   65: 	print OUT 'Include conf/srm.conf'."\n";
   66: 	close OUT;
   67:   }
   68:   $flag=0;
   69:   open IN, "&lt;<TARGET />";
   70:   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/access.conf/) { $flag=1; } }
   71:   close IN;
   72:   unless ($flag==1) {
   73: 	open OUT,"&gt;&gt;<TARGET />";
   74: 	print OUT 'Include conf/access.conf'."\n";
   75: 	close OUT;
   76:   }
   77:   my $eflag=0;
   78:   $flag=0;
   79:   open IN, "&lt;<TARGET />";
   80:   while (&lt;IN&gt;) { 
   81:     if (/^\s*Include\s+conf\/loncapa_apache.conf/) {
   82:       $flag=1; 
   83:     }
   84:   }
   85:   close IN;
   86:   unless ($flag==1) {
   87: 	open OUT,"&gt;&gt;<TARGET />";
   88: 	print OUT 'Include conf/loncapa_apache.conf'."\n";
   89: 	close OUT;
   90:   }
   91:   $flag=0;
   92:   open IN, "&lt;<TARGET />";
   93:   while (&lt;IN&gt;) { 
   94:     if (/^\s*Include\s+conf\/loncapa.conf/) {
   95:       $flag=1; 
   96:     }
   97:   }
   98:   close IN;
   99:   unless ($flag==1) {
  100: 	open OUT,"&gt;&gt;<TARGET />";
  101: 	print OUT 'Include conf/loncapa.conf'."\n";
  102: 	close OUT;
  103:   }
  104: }
  105: </perlscript>
  106: </file>
  107: <file>
  108: <target dist='default'>/etc/httpd/conf/access.conf</target>
  109: <note>This may or may not exist on a system depending on the version of
  110: Apache</note>
  111: <dependencies dist='default'>
  112: /etc/httpd/conf/access.conf
  113: </dependencies>
  114: <perlscript mode='fg'>
  115: unless (-e "<TARGET />") {
  116: 	print &lt;&lt;END;
  117: WARNING! access.conf is not currently present on your system.
  118: This is either due to 
  119: * you are missing the Apache software package,
  120: * you have a newer version of Apache that does not
  121:   ordinarily install an access.conf
  122: * configuration files are installed in a directory location
  123:   different than for <TARGET />
  124: For backwards compatibility,
  125: <TARGET /> is being generated.
  126: END
  127: }
  128: my $flag=0;
  129: open IN, "&lt;<TARGET />";
  130: while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa_apache.conf/)
  131: 	 { $flag=1; } }
  132: close IN;
  133: unless ($flag==1) {
  134: open OUT,"&gt;&gt;<TARGET />";
  135: print OUT 'Include conf/loncapa_apache.conf'."\n";
  136: close OUT;
  137: $flag=0;
  138: open IN, "&lt;<TARGET />";
  139: while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa.conf/) { $flag=1; } }
  140: close IN;
  141: unless ($flag==1) {
  142: open OUT,"&gt;&gt;<TARGET />";
  143: print OUT 'Include conf/loncapa.conf'."\n";
  144: close OUT;
  145: }
  146: </perlscript>
  147: </file>
  148: <file>
  149: <target dist='default'>/etc/httpd/conf/srm.conf</target>
  150: <note>This may or may not exist on a system depending on the version of
  151: Apache</note>
  152: <dependencies dist='default'>
  153: /etc/httpd/conf/srm.conf
  154: </dependencies>
  155: <perlscript mode='fg'>
  156: unless (-e "<TARGET />") {
  157: 	print &lt;&lt;END;
  158: WARNING! srm.conf is not currently present on your system.
  159: This is either due to 
  160: * you are missing the Apache software package,
  161: * you have a newer version of Apache that does not
  162:   ordinarily install an srm.conf
  163: * configuration files are installed in a directory location
  164:   different than for <TARGET />
  165: For backwards compatibility,
  166: <TARGET /> is being generated.
  167: END
  168: }
  169: my $flag=0;
  170: open IN, "&lt;<TARGET />";
  171: while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa_apache.conf/)
  172:  { $flag=1; } }
  173: close IN;
  174: unless ($flag==1) {
  175: open OUT,"&gt;&gt;<TARGET />";
  176: print OUT 'Include conf/loncapa_apache.conf'."\n";
  177: close OUT;
  178: $flag=0;
  179: open IN, "&lt;<TARGET />";
  180: while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa.conf/) { $flag=1; } }
  181: close IN;
  182: unless ($flag==1) {
  183: open OUT,"&gt;&gt;<TARGET />";
  184: print OUT 'Include conf/loncapa.conf'."\n";
  185: close OUT;
  186: }
  187: </perlscript>
  188: </file>
  189: </files>
  190: </piml>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>