How To Make Your Own Web Pages

  1. Where to Start
  2. Web documents can be served on both the DEC and SUN computers. So, your web documents can be in either of your home directories. If you use your SUN account the URL will be the following

    http://www.atmos.ucla.edu/~[user id]

    and if you use your DEC account

    http://uniblab.atmos.ucla.edu/~[user id]

  3. Releasing your files to the Web
  4. It is very easy to make files available to the World Wide Web. The first thing you do is go to your home directory and create a subdirectory called webdocs ( on the DEC's) or public_html (on the SUN's). Then any files you put in this location will automatically be available on the WEB. The web server maps URL's into local file names in the following way. Suppose your user ID is maria, and you have a file called
    	~maria/webdocs/myfile
    
    The Web sees your file as
    	http://www.atmos.ucla.edu/~maria/myfile
    

  5. Hiding Things
  6. Suppose someone requests a document from the Web, and specifies only a directory name; for example
    	http://www.atmos.ucla.edu/~maria/
    
    Under some circumstances, the server would send a listing of the files in ~maria/webdocs (~maria/public_html). However, if you include a local file called ~maria/webdocs/index.html (~maria/public_html/index.html), the server will send that instead. index.html is a convenient name for your home page, because it keeps your URL short, and it helps you hide files which you may want to keep in webdocs (public_html) but don't want others to see. You can also put an index.html file in any subdirectories you have under your webdocs (public_html) directory to protect those areas.

  7. Access
  8. The web server is just like another user. If other users cannot read your files, the server will not be able to either. So remember to check your file permissions (using ls -l), and to fix them if necessary (using chmod).

    The following will work: chmod 755 public_html

  9. Writing Hypertext
  10. You can put any kind of files in your Web directory: plain text, images, binary data, even executable programs. The home pages that you see all over the Web are text files, written in the Hypertext Markup Language (HTML). The quickest way to learn HTML is by example. All Web browsers have a View Source option, usually under the File menu that lets you see the actual HTML code for the document you are looking at. Try it now, and see how this document was written.

    Web browsers such as Mosaic and Netscape have built-in links with help on how to write hypertext, listed under the Help menu, of course. The HTML primer is an easy-to-follow guide on the subject.

    For further assistance you can also consult with the Departments web programmer Matt Howard at matth@atmos.ucla.edu.

dpk 01 May 1998
devin@atmos.ucla.edu