GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
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/JimMartinson/CST2608/Labs/Lab05/ |
Upload File : |
<? // JimMartinson/CST2608/Labs/Lab06/Lab06.phpinc require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced. require('JimMartinson/CST2608/Labs/StudentServerNameNAT.phpinc'); require('common/Browser/Browser.phpinc'); $disabled = ''; $disabled = ' disabled'; // Comment this line to enable lab. ?> <fieldset><legend>Description</legend> The purpose of this lab is to demonstrate your ability to setup a Web server and PHP. <br><span class="note normal">DO NOT PERFORM THIS LAB UNTIL Lab 3.5 has been successfully performed.</span> <?=$gradeNote?> <? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?> </fieldset> <fieldset><legend>Lab Instruction</legend> Create a folder for this <?=strtolower($evaluationType)?> named <b class="copyText"><?=$evaluationName?></b> and keep all documents used for <?=$evaluationType?> <?=$evaluationNumber?> in that folder. <ol id="main" class="count"> <li>Install Apache Web Server. <ol type="a"> <li>Install Apache2 Web Server as per the <a href="https://ubuntu.com/server/docs/how-to-install-apache2">How to install Apache2</a> docmentation and by reviewing the recording.</li> <li>Restart Apache. <br><kbd class="copyText">sudo service apache2 restart</kbd> </li> <li>Test your installation. <br>Open a brower and enter your server name in the location bar(<b class="copyText"><?=$Uservername?>.<?=$domain?></b>). <br>You should see the default Ubuntu Apache index file. </li> <li>Edit the index.html file. <br><kbd class="copyText">sudo pico /var/www/html/index.html</kbd> </li> <li>Replace the text in the index.html file with this: <pre class="code copyText"><html> <head> <title><?=$userFullname?>'s Website</title> </head> <body> <h1>It works for <?=$userFullname?>!</h1> <p> Test PHP by loading the <a href="phpinfo.php">phpinfo.php</a> page. </body> </html></pre> </li> <li>Open a browser and go to <b class="copyText">http://<?=$Uservername?>.<?=$domain?></b>. <? $postfix = 'a'; ?> <br>Take a screenshot and save it as <b class="copyText" 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($userFullname."'s Website",$Uservername.'.'.$domain,850); ?> <h1 style="text-align: left;">It works for <?=$userFullname?>!</h1> Test PHP by loading the <a href="#" onClick="return false;">phpinfo.php</a> page. <? BrowserEnd(); ?> </div> </li> </ol> </li> <li>Install PHP. <ol type="a"> <li>Install PHP as per the <a href="https://ubuntu.com/server/docs/programming-php">How to install and configure PHP</a> docmentation and by reviewing the recording.</li> <li>Restart Apache. <br><kbd class="copyText">sudo service apache2 restart</kbd> </li> <li>Test your installation. <br>Open a brower and enter your server name in the location bar (<b class="copyText"><?=$Uservername?>.<?=$domain?></b>). </li> <li>Create the phpinfo.php file. <br><kbd class="copyText">sudo pico /var/www/html/phpinfo.php</kbd> <br>Enter the following: <pre class="code copyText"><?php print "<h1><?=$userFullname?></h1>"; 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 class="copyText" 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($userFullname."'s Website",$Uservername.'.'.$domain); ?> <img src="images/php.png" title="Example screenshot" style="display:block; margin:0 auto;"> <? 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 class="copyText" 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($userFullname."'s Website",'https://'.$Uservername.'.'.$domain.':10000'); ?> <img src="images/webmin_apache.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 class="copyText" 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($userFullname."'s Website",'https://'.$Uservername.'.'.$domain.':10000'); ?> <img src="images/webmin_php.png" title="Example screenshot"> <? BrowserEnd(); ?> </div> </li> </ol> </li> <li>Turn in your assignment: <ol type="a"> <!-- <li>Copy <b class="copyText">/var/www/html/index.html</b> to your <b><?=$evaluationName?></b> folder.</li> <li>Copy <b class="copyText">/var/www/html/phpinfo.php</b> 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>index.html <span class="note">(copied from <span class="copyText">/var/www/html/index.html</span>)</span>.</li> <li>phpinfo.php <span class="note">(copied from <span class="copyText">/var/www/html/phpinfo.php</span>)</span>.</li> --> </ol> </li> <li>Zip up your <b><?=$evaluationName?></b> directory into a file named <b class="copyText"><?=$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.<? if ( $disabled ) { ?> <span class="error bold">Notice: You cannot submit this lab unless this notice has been removed.</span><? } ?></li> </ol> </li> </ol><? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?> </fieldset> <? require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced. if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n"; ?>