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/MichaelMalz/CST2608/_Archive/Labs/Lab06/ |
Upload File : |
<? // JimMartinson/CST2608/Labs/Lab06/index.php include('Course/courseInfo.phpinc'); include('../../classInfo.phpinc'); $assignmentTitle = "Web server"; $evaluationNumber = twoDigit($assignmentNumber); $evaluationType = "Lab"; $evaluationTitle = $assignmentTitle; if (strlen($assignmentNumber) == 1) { $assignmentName = $assignmentType."0".$assignmentNumber; $evaluationName = $evaluationType."0".$assignmentNumber; } else { $assignmentName = $assignmentType.$assignmentNumber; $evaluationName = $evaluationType.$assignmentNumber; } if ($evaluationTitle != '') $evaluationTitle = ' - '.$evaluationTitle; $title = $assignmentType." ".$assignmentNumber.": ".$assignmentTitle; $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'); $sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title.' - '.username($userId); $servername = strtolower(str_replace(array("-"," "),"",userLastname($userId))); $spaces = 12 - strlen($servername); $username = strtolower(str_replace(array("-"," "),"",$_SESSION['userFirstName'])); if ( $spaces > 0 ) { $spaces = str_repeat(" ",$spaces); } else { $spaces = " "; } include('common/sectionHeader.phpinc'); ?> <fieldset><legend>Description</legend> Setup a Web server and PHP. </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 (mine was <code>martinson.ubuntu.loc</code>. </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"><html> <head> <title><?=$_SESSION['userFullName']?>'s Website</title> </head> <body> <h1>It works for <?=$_SESSION['userFullName']?>!</h1> <p> Test PHP by loading the <a href="phpinfo.php">phpinfo.php</a> page. </body> </html></pre> </li> <? $postfix = 'a'; ?> <li>Open a browser and go to <b><?=$servername?>.ubuntu.loc</b>. <br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFullName?>.png</b>. <br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">Show 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><img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot"></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 (mine was <code>usjim.ubuntu.loc</code>. </li> <li>Create the phpinfo.php file. <br><kbd>sudo pico /var/www/phpinfo.php</kbd> <br>Enter the following: <pre class="code"><?php phpinfo(); ?> </pre> </li> <? $postfix = 'b'; ?> <li>Back in the browser, click on the phpinfo.php link. <br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFullName?>.png</b>. <br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">Show 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><img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot"></div> </li> </ol> </li> <li>Get Apache working with Webmin. <ol type="a"> <li>Get Apache working with Webmin.</li> <? $postfix = 'c'; ?> <li>Open Webmin in your browser and go to <b>Servers/Apache Webserver</b>. <br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFullName?>.png</b>. <br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">Show 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><img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot"></div> </li> </li> </ol> </li> <li>Get PHP working with Webmin. <ol type="a"> <li>Get PHP working with Webmin.</li> <? $postfix = 'd'; ?> <li>Open Webmin in your browser and go to <b>Others/PHP Configuration</b>. <br>Take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?><?=$postfix?>-<?=$userFullName?>.png</b>. <br><div id="show<?=$evaluationNumber?><?=$postfix?>" class="inline">(<a href="#" onClick="divHide('show<?=$evaluationNumber?><?=$postfix?>'); divShow('<?=$evaluationNumber?><?=$postfix?>'); return false;">Show 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><img src="images/CST2608-Lab<?=$evaluationNumber?><?=$postfix?>-JimMartinson.png" title="Example screenshot"></div> </li> </ol> </li> <li> <a href="mailto:jim.martinson@ridgewater.edu?subject=<?=$courseNumber?> <?=$evaluationName?> Submission">Send an email</a> to jim.martinson@ridgewater.edu with a subject of <b style="white-space:nowrap"><?=$courseNumber?> <?=$evaluationName?> Submission</b> and attach the following files: <ol type="a"> <li><?=$courseNumber?>-<?=$evaluationName?>a-<?=$userFullName?>.png</li> <li><?=$courseNumber?>-<?=$evaluationName?>b-<?=$userFullName?>.png</li> <li><?=$courseNumber?>-<?=$evaluationName?>c-<?=$userFullName?>.png</li> <li><?=$courseNumber?>-<?=$evaluationName?>d-<?=$userFullName?>.png</li> <li>/etc/apache2/sites-available/default</li> <li>/var/www/index.html</li> <li>/var/www/phpinfo.php</li> </ol> </li> </ol> </fieldset> <fieldset class="pio"><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'); ?>