Web Hosting on the Unix Cluster
Log Into Your Unix Account
Your Caltech user account comes with shell access to our Unix cluster which is running RedHat Linux. You can log into your account using ssh:
ssh ssh.caltech.edu
Or you can use an sFTP client to connect to ssh.caltech.edu. In either case, once you log in, you will be in your home directory: /home/<username>/ which is aliased to ~
per unix convention.
Create a Directory for Your Pages
Note that you will need to set this directory up no matter what interface you plan to use to edit your web documents. First, create a directory called public_html in your home directory.
cd ~
mkdir public_html
chmod 755 public_html
This directory has the URL
http://www.its.caltech.edu/~username/
(Substitute your username for username.)
Any files that you put in the public_html directory will be accessible via the Web. For instance, if you put a file blorf.html in there, its URL would be
http://www.its.caltech.edu/~username/blorf.html
An Important Note about File Permissions
Note that files in the public_html directory and its subdirectories should be -rw-r--r-- for them to be viewable on the web, and subdirectories themselves should be -rwxr-xr-x. You can set these permissions by doing:
chmod 644 filename
and/or
chmod 755 subdirectoryname
Default page (optional)
If you want, you can also make a default page, which corresponds to the URL
http://www.its.caltech.edu/~username/
Without making a default page, this URL gives an index of all of the files in your directory. If you make a default page, the URL will instead give the contents of that page. To make the page blorf.html the default page, type
ln -s blorf.html index.html
(The server looks for a file called index.html when looking for a default page. The above command makes index.html be a symbolic link to the real file -- effectively, one file now has two names.)
Making a default page is nice because, if someone only knows your user name, they can access your Web space without having to know the exact name of your home page.