EECS Instructional Support Group, Department of Electrical Engineering & Computer Science
[ ISG home page ] [ who we are ] [ send us email ] [ search ] [ FAQ ]

How to Set up a Home Page
on the EECS Instructional Computers

Topics:
  • What is a "home page"?
  • How to Set up a Class Home Page
  • WEB services for Courses
  • HTML Code Sample: a Simple Homepage
  • HTML Code Sample: index.html for a Class WEB Page
  • HTML Code Sample: archives.html for a Class WEB Page
  • How to "Publish" using an HTML Editor
  • Debugging Tips
  • Updating your .htaccess files
  • Features:   SSI, CGI, PHP, GD, sym links, redirect
  • Restricting Access to your WEB Site
  • Usage Policies for Information Servers
  • General References about WWW utilities
  • Apache HTTP Server Project Home Page
  • Apache Manual for this WWW Server


  • What is a "home page"?

    A "home page" is a text document that may also contain references ("links") to other home pages and to text and graphics documents. It is generally a single page or the top level of a hierarchy of pages on a specific subject (such as you). The source text file for it may be browsed by selecting the "View Document Source..." option of your
    Web browser. The special features of a WWW home page are defined by simple HTML commands that are typed into the source text file.


    How to Set up a Class Home Page (for instructors)

    There are several WEB services for courses.   Our recommendation to EECS instructors is:

    1. create a course site on the EECS Inst server
    2. use the EECS Inst site for posting public content
    3. use the EECS Inst site for dynamic content (CGIs)

    In addition, if you wish to communicate on-line with the students and post password-protected content:

    1. create a course site on the campus course management system: bCourses
    2. make a publically-viewable information page on bCourses, perhaps by displaying the Syllabus or a link to your class site on the EECS Inst WEB server
    3. advise students to login there and join your course site

    For a summary of the course WEB services at UCB, see WEB services for courses below.

    The EECS Instructional WEB server:


    WEB services for courses:

    There are several UCB WEB servers that EECS instructors can use to post course materials.   Here is a summary.



    HTML Code Sample: index.html for a Class WEB Page

    This is a simple WEB page that can be edited with text editor such as "vi" or "emacs". This file redirects to the current WEB page for the class.

    <HTML> <HEAD> <META HTTP-EQUIV="X-instructional-class-redirect" CONTENT="CS123"> <TITLE>CS123 Home Page</TITLE> <META HTTP-EQUIV="Refresh" CONTENT="0;URL=./sp05"> </HEAD> <HTML> <BODY> <CENTER> <A HREF="http://www.berkeley.edu/">University of California at Berkeley</A> <BR> <A HREF="http://www.eecs.berkeley.edu/">Dept of Electrical Engineering &amp; Computer Sciences</A> <BR> <H1>CS123<BR></H1> </CENTER> <P style="line-height:1.5"> This page should jump to the current WEB page for this course. &nbsp; If not, please visit <a href="./archives.html">the WEB site archive list<a/>. <P style="line-height:1.5"> For information regarding this course: <A HREF="http://schedule.berkeley.edu/">Course Catalog and Schedule of Classes</A> </P> </BODY> </HTML>
    Set the file permsssions with these UNIX commands:

      % chmod 711 ~/				# your top level home directory
      % chmod 711 ~/public_html
      % chmod 755 ~/public_html/index.html
    

    The timer before jumping is set by the "0" in this line:

    <meta http-equiv="Refresh" content="0;URL=./sp05"> If you set it to 0, the jump is immediate.


    HTML Code Sample: archives.html for a Class WEB Page

    This file is maintained automatically by a script. It has a list of previous class WEB sites for the class.

    <HTML> <HEAD> <META HTTP-EQUIV="X-instructional-class-archives" CONTENT="CS123"> <TITLE>CS123 Home Page</TITLE> </HEAD> <BODY> <CENTER> <A HREF="http://www.berkeley.edu/">University of California at Berkeley</A> <BR> <A HREF="http://www.eecs.berkeley.edu/">Dept of Electrical Engineering &amp; Computer Sciences</A> <BR> <H1>CS123<BR></H1> </CENTER> <P style="line-height:1.5"> <P style="line-height:1.5"> Prior semester archives: <!-- A SCRIPT WILL INSERT NEW ENTRIES HERE --> [<A HREF="sp05/">Spring 2005</A>] <P style="line-height:1.5"> For information regarding this course: <A HREF="http://schedule.berkeley.edu/">Course Catalog and Schedule of Classes</A> </P> </BODY> </HTML>
    Set the file permsssions with this UNIX command:

      % chmod 755 ~/public_html/archives.html
    


    HTML Code Sample: a Simple Homepage

    You can create a simple homepage by using a UNIX text editor (such as "vi" or "emacs") to enter this HTML code and save it to a file called "index.html" in the "public_html" subdirectory of your home directory:
    <HTML> <HEAD> <TITLE>My Home Page</TITLE> <CENTER> <H1>Welcome to <I>My</I> Home Page</H1> </CENTER> </HEAD> <BODY> <P style="line-height:1.5"> Here is some text about me. </BODY> </HTML>
    Set the file permsssions with these UNIX commands:
      % chmod 711 ~/				# your top level home directory
      % chmod 711 ~/public_html
      % chmod 755 ~/public_html/index.html
    

    The http://inst.eecs.berkeley.edu WEB server will display that file using the URL http://inst.eecs.berkeley.edu/~yourlogin.

    You can see examples of other people's HTML code by selecting the "Page Source" option that is available in most WEB browsers. Many people use a graphical WEB page editor such as Netscape Composer or Microsoft FrontPage (see Publishing, below), but there is no shame in coding it by hand!


    How to "Publish" using an HTML Editor

    Your WEB site files are under the "public_html" directory in your UNIX home directory. Your file called "public_html/index.html" is your default home page on our WWW server (http://inst.eecs.berkeley.edu).

    There are 3 ways create and update you WEB pages:   edit on UNIX,   edit on Windows and   file transfer


    Debugging Tips

    If you are getting an error message from a WEB page or CGI program that you are displaying via http://inst.eecs.berkeley.edu, you may find clues about the problem by searching for either your login name, the WEB page name or the program name in the Server Access and Error Logs.

    Here are some common error conditions and solutions:

    "Internal Server Error" error

    "Premature end of script headers:" error


    Updating your .htaccess files

    The inst.eecs.berkeley.edu WEB server was updated in January 2011 with a new version of the "modauth" module, which handles access control via .htaccess files. As a result, you may need to update your .htaccess files.

    The new version of Apache (2.2.17) changes some of the directives that are used in .htaccess files that control access to WEB sites. The changes are that the "AuthBasicProvider" line should be added and the "AuthDBMAuthoritative" line should be removed.

    Here is a typical updated .htaccess file:

    	SSLRequireSSL
    	AuthName "An authorized account is required..."
    	AuthType Basic
    	AuthBasicProvider dbm file		
    	AuthDBMType GDBM
    	AuthDBMUserFile  /pool/www/data/master-access
    	AuthDBMGroupFile /pool/www/data/master-access
    	#AuthDBMAuthoritative off			# this line is obsolete
    	AuthUserFile  /home/ff/cs123/public_html/login/SSL/users
    	AuthGroupFile /home/ff/cs123/public_html/login/SSL/groups
    	Require group allow
    

    The *UserFile and *GroupFile lines define what sources will be searched to authenticate the users.

    The "master-access" DBM file contains the users and groups from the Instructional UNIX systems.

    The files "users" and "groups" are files that you can create with login/password matches of your own invention. You can locate these files anywhere under your own public_html directory. Include the full path to them after the AuthUserFile and AuthGroupFile directives.

    The Require line defines which users within those sources will be accepted. In the Require line:

    	"valid" = all UNIX accounts (taken from the dbm password service)
    	"allow" = a group of users that may be listed in the "groups" file
    

    Please see
    http://inst.eecs.berkeley.edu/setup.html#restrict for more information about using .htaccess files.

    If you find an error on one of your WEB pages, please send email to inst@eecs.berkeley.edu with the URL of that page and a description of the content that is incorrect. Thank you.


    Features of this WWW Server

    Home pages:

    Server-side "includes" (SSI):

    PHP:

    GD:

    CGI scripts:

    Symbolic links:

    Redirecting WEB pages:


    Restricting Access to your WEB Site

    You can restrict the access to files in your WEB site:
    1. by computer    (list the authorized computers in .htaccess)
    2. by user    (list the users and passwords in .htpasswd)
    3. by file permission    (use a CGI program to access files that are not world-readable)
    4. by SSL    (use the SSLRequireSSL directive in .htaccess; can also use .htpasswd)
    These methods are described below.

    For more information about adding access control individual subdirectories, please see

    Allow access only to certain computers:

    Allow access only to certain people:

    Limitations of using .htaccess and .htpasswd files:

    Using a CGI script to restrict access by UNIX file permissions:

    Security using SSL:


    Usage Policies for Information Servers

    "Informed Consent" Required for Displaying Student Identities

    Information that you display publically via University computers may not include the names of a student without an "informed consent" from the student. Restricting access to WEB pages, say to the EECS or BERKELEY.EDU domains, is not sufficient: informed consent is still required. This is a requirement by federal law. An example of "informed consent" is:

    Please refer to the Policy Analysts at the Office of the Registrar, 127 Sproul Hall, for further clarification about the requirement for "informed consent".

    Other topics:


    General References about WWW utilities

    These are public documents that have more about the WWW and the HTML language used in writing home pages (these may not always be available):

    Last modified: Thursday, 11-02-2023 15:40:10
    inst@eecs.berkeley.edu