Departments & Programs

More

Setting up your personal web site on pangea



Last revision September 25, 2013

Web Hosting Table of Contents:
  1. Using Pangea web server
  2. Personal web site
  3. Limiting access to web pages
  4. Using include files and templates on pangea
  5. Using the pangea mail form
  6. Suggestions for creating/editing pages
  7. Other resources

Any member of the Stanford Earth Sciences community with a home share on the School file server sesfs can make his/her personal Web documents available through the pangea web server by following the steps outlined below.

Group pages should be served from a group directory, not a personal home share, particularly since home shares are deleted when a person leaves Stanford. Contact the pangea webmaster to make a group directory.

Any files you put in your home share for serving on the web count against your 10 GB disk quota for your home share on the file server. If you have large amounts of personal materials to share, particularly if they are unrelated to your academic work, you should use one of the many inexpensive commercial providers, such as 1&1 Internet or DreamHost. Large photo collections are best shared on a photo-sharing site such as Flickr or Picasa.

Verify the WWW folder (directory) exists in your sesfs home share.

Connect to the sesfs file server and access your home share, which is named the same as your SUNet ID name. Verify that the WWW folder exists. The name must have all capital letters - lowercase "w" will not work. You will put your documents to share in this folder. This folder is automatically created for all new accounts on the file server. You do not need to do anything, unless you have accidentally deleted this folder. In that case, simply remake the folder!

You will find that a initial generic index.html file already exists in your WWW folder. It simply states that you have not made any web pages yet, as shown in this example. Delete it when you start to make your own pages.

Create and load your home page and other pages.

  • Your web pages must be created in normal HTML. PHP scripts will not work on your personal web site. Use an HTML editor program, or create simple pages using HTML codes directly with a text editor - but be sure to save them in "text only" format! If you are unfamiliar with HTML, use a search engine to find a primer such as HTML for Beginners or Getting Started with HTML.

  • You may place many documents within your WWW folder, or you can make subfolders for them. All your web pages, graphics, etc., must be in your own WWW folder or its subfolders, although your pages can contain standard URL links to other people's pages or other servers.

  • If you organize documents into subfolders and want to link to them, the simplest way to specify the link is by relative location. For example, assume I put HTML pages in my WWW folder but create a subfolder named images to hold graphics files, such as a portrait of myself named portrait.jpg. If I want to link to that graphics file from an HTML page in the main WWW folder, for example, from my index.html file, the simplest file path reference is images/portrait.jpg. This tells the web server to start in the same folder as the index.html file (that is, start in my WWW folder), then look for a subfolder named images, and then look for a file named portrait.jpg inside that images subfolder. For example, this HTML tag in my index.html page would load the portrait file:

    <img src="images/portrait.jpg">

    You can also use absolute references to files in subfolders of your WWW folder. They must always start with /~sunetid/, where sunetid is your SUNet ID name (and also home share name). The slash and tilde characters (/~) before your SUNet ID name are required. This tells the web server to start looking in the WWW folder of the home share for the user named sunetid to find the folder and file path specification, even if the HTML file making the link is located in a subfolder. For example, I can link to that same portrait file, assuming my SUNet ID is "farrell", using this HTML tag with an absolute file path:

    <img src="/~farrell/images/portrait.jpg">

    The advantage of an absolute path reference, of course, is that it still works even if you move the HTML file down into a subfolder. A relative path reference always starts in the same folder as the HTML file that contains it, so it will break if the HTML file is moved to a different folder.

  • For security reasons, you cannot put pages written in PHP, or other executable scripts or programs, in your own WWW folder. Contact the webmaster if you want to create or import a CGI script. He must put it into a special system directory, after checking it for possible security problems.

Take a look at your web pages.

  • The URL (web address) for the web documents in your WWW folder is:

    http://pangea.stanford.edu/~sunetid/document.html

    You must substitute your own SUNet ID name in place of sunetid but leave the tilde character (~) before your SUNet ID name, and substitute the name of your HTML file in place of document.html.

  • Home shares on sesfs are configured with permission settings to allow the pangea web server process to read and serve files from your WWW folder. If the server complains that it does not have permissions, contact the sesfs managers to fix that.

  • The document name index.html (or index.shtml) is special. If a document with one of these names exists in your WWW folder, it will be displayed when you use the simpler URL:

    http://pangea.stanford.edu/~sunetid/

    Thus, index.html is the best name for your "main" page, as it can be referenced simply by your SUNet ID name.

  • As a Linux system, pangea is case-sensitive. This means that file names with upper-case (capital) letters are not the same as file names with lower-case letters. These three addresses point to different files:

    http://pangea.stanford.edu/~sunetid/index.html
    http://pangea.stanford.edu/~sunetid/INDEX.html
    http://pangea.stanford.edu/~sunetid/index.HTML

    To avoid problems finding your files, use only lower-case letters in the file names and extensions.

If you have a general interest document that should be linked into the main Stanford Earth Sciences page or one of the department pages, send a message to the pangea webmaster which includes the URL of your document.

Comments or Questions?