Configuring a web server on your computer

Overview

In lab 1 you built a website and hosted it (published it) onto one of Temple's servers namely astro.temple.edu.  In this lab you will host a website (could be same as the one in your lab1) onto your computer on which you installed FEDORA CORE 4 in your previous lab.

Details

1. Configuring the server

  1. Login as "root"
  2. Using any text editor (like vi or pico or nano) open the file 'httpd.conf' located in /etc/httpd/conf
  3. Find the <IfModule mod_userdir.c> tag and comment (put a #) the line UserDir disable and uncomment (remove the #) the line UserDir public_html
  4. Find the <Directory /home/*/public_html> tag and uncomment the tag beginning and end and the first two lines.
  5. Open a terminal.
  6. Type in the command 'service httpd start'

Note: Whenever you change the 'httpd.conf' file you have to stop and start the httpd daemon.  Or you can simply 'service httpd restart'

2. Testing the server

Open a browser and type in http://your_computer_name.cis.temple.edu and you should see a Apache test page.

3. Hosting your site

Create a new website or (copy all the files from your website on astro using gftp (a program similar in functionality to WinSCP3)) and place the website into /home/username_you_created/public_html

Again make sure you have appropriate permissions (learnt in lab 1) set up.  Also change .htaccess file so that it now has the exact path to .htpasswd file on your computer.

That's it now you can access your website by http://your_computer_name.cis.temple.edu/~username_you_created

4. Creating a default page

Create a new index.html file that has description about your computer (Host Name, IP address, Main memory size, Hard disk size, Processor speed - for these explore different tools available in FEDORA . Try your best!) and a link to http://your_computer_name.cis.temple.edu/~username_you_created

Place this file in /var/www/html folder.  Make sure you have proper permissions (learnt in lab 1) set up.

5. Submit (to nagesh@temple.edu)


Email subject: 230-xxxx-Lab-y

(xxxx- last four digits of your TUID, y-lab number)

Email content: Your name, your IP address, your computer's name.

*Note: I open up the URL http://your_computer_name.cis.temple.edu and then check from there.  If the link does not work you loose points.