Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Search:

CA216      CA249      CA318

CA400      CA651      CA668


Lab - Web


  1. web page

  2. student.computing.dcu.ie
    • Runs Linux
    • This has access to your home directories (on shared / distributed file system).
      e.g. your web dir:
       /users/GROUP/USER/public_html 
      
    • It also has its own web dir, which is something like:
        /htdocs  
        /srv/www/htdocs  
        /local/apache/htdocs  
      
      ssh to student.computing.dcu.ie to see this dir.


    URL maps to this file
    http://student.computing.dcu.ie/ /srv/www/htdocs/index.html
    http://student.computing.dcu.ie/STRING/ /srv/www/htdocs/STRING/index.html
    http://student.computing.dcu.ie/~STRING/ /users/gdf1/STRING/public_html/index.html


  3. Tilde convention:
    • Comes from Unix command-line. Means home:
      cd ~/bin is same as cd $HOME/bin
    • student.computing.dcu.ie and www.computing.dcu.ie both use tilde convention for user web pages.

  4. www.computing.dcu.ie
    • Runs Linux
    • PHP test shows Linux.
    • Accesses a different file system.


  5. Two web servers:

    URL server IP server OS result
    http://student.computing.dcu.ie/~STUDENT/ 136.206.217.46 Linux Works.
    http://student.computing.dcu.ie/~STAFF/ 136.206.217.46 Linux Fails. Can't access other file system.

    
    
    URL server IP server OS result
    http://www.computing.dcu.ie/~STAFF/ 136.206.217.25 Linux Works.
    http://www.computing.dcu.ie/~STUDENT/ 136.206.217.25 Linux Fails. Can't access other file system.




Exercise 1

  1. Make a web page:
    cd
    cd public_html
    gedit index.html &
    
  2. Put some HTML in it.
  3. View it as: http://student.computing.dcu.ie/~username/

  4. Make it link to another page using <a href ...
  5. Make the 2nd page link back to the main page.
  6. View both pages through the browser.




Exercise 2

  1. Make an offline web page file.html in your home directory (not in your public_html):
    cd
    gedit file.html &
    
  2. View it in the browser through: file:// (double click on it)
  3. You cannot view it through: http://

  4. Insert an <img src ... tag in it that embeds an image.
  5. The image will be an image on the local disk, not on the web.
  6. The image will be the image of Shakespeare found in my directory.
  7. Figure out how to view my Shakespeare files through the browser. Find the location of the image of Shakespeare.
  8. Embed using the path to my image, not a copy.



Feeds      w2mind.org

On Internet since 1987.