Setting up a Professional Webpage on the Physics Servers


The physics servers offer a range of computing facilities for graduate students and host all of the department webpages. As such, an account on the physics servers enables the creation of a professional website attached to the department.

The first step is to request an account by filling out the form under Facilities and Computing on the department's webpage. Note the form's field,''Desired Username'' -- your username will be apart of your webpage's URL. For example, if your name is ''Jane Smith'' and you request your username to be ''jane.smith'', then your webpage's address would be:

http://www.physics.utah.edu/~jane.smith/

Having an appropriate username helps search engines correctly identify your homepage and is thus important.

Once your account has been approved, you may SSH into your account via a Unix/Linux terminal (following the above username example):

ssh jane.smith@physics.utah.edu

Alternatively you may access the account by logging into the servers via any of the server boxes located in the physics library, South Physics 205, or your office if it has been equipped; this will give you a GUI to work with.

Once logged in, you'll want to create the directory ''public_html'' (with the underscore!) in your home directory. If you logged in via a terminal, you will already be in your home directory. Via the command line, this would be:

jane.smith@planck > mkdir public_html/

(The ''mkdir public_html/'' is what you type and the ''jane.smith@planck >'' is the command prompt.) You can check the placement is correct with the command 'pwd' (returns the full path to your current working directory) and 'ls' (lists all contents of the current working directory) in the terminal; your terminal -- with both these commands and their outputs -- should look something like:

jane.smith@planck > pwd
/u/grad/jane.smith
jane.smith@planck > ls
Desktop/ Downloads/ public_html/
Documents/ Music/ Videos/

Inside the directory public_html will be where you'll put all of the different files for your webpage. The most important of these is the file for your homepage: ''index.html''. In order for this to be accessible to others attempting to view these files via a web browser (i.e. looking at your website), you need to give them executable permissions using the ''chmod'' command:

jane.smith@planck > chmod o+x public_html/

This adds executable permissions for others to the prescribed file or directory. In order for files therein to be accessible, browsers used by others will have to be able to read ('r' instead of 'x' in the above chmod command) the files, and chmod can be used on those as well.

From here, everything else is just coding the website in HTML and CSS -- the latter is ''cascading style sheets'' and provides an efficient way of nesting stylization commands for one's HTML code. Even fancier techniques are achievable with scripting languages such as javascript, perl, or PHP. However, for a simple, clean, professional website, HTML and CSS are sufficient to get the job done. Many resources exist online, naturally, but w3schools' extensive documentation for the surprisingly short list of HTML and CSS commands that is quite helpful.

For editing files, use any plain text editor -- editors like Word or Pages are programs with their own codes underlying the text editor, and this creates problems when computers attempt to execute files expected to be plain text. If you want to work via command line, several popular text editors, such as emacs or vim, exist and can be utilized. If you wish to work on your own computer and upload your file, you may utilize the sftp command (Secure File Transfer Protocol), which works similarly to SSH. The latter may be preferable so that you can view the website in your own browser before uploading it to the physics servers for the entire world to see.

or more information about working with unix systems, please see Indiana State University's excellent page on basic Unix commands as well as their page on SFTP. CHPC also has a fairly short video providing a good crash-course introduction to Linux.