Carnegie Mellon University School of Computer Science

Personal or Project Websites

This page describes the process for setting up a static personal or project SCS website. These websites serve user-created static content from the main SCS Web servers. The URL for a personal or project SCS website is  http://cs.cmu.edu/~example where you replace “example” with the user’s actual SCS username. The URL for a project SCS website would be the same, though you would replace "example" with the name of the project instead of a username. 
Personal SCS websites are available for individual users with active SCS accounts or for projects, labs or research groups. Personal SCS websites are accessible to the public Internet and should not be used to store sensitive or confidential data.

Prerequisites

In order to set up your personal SCS website, you will need access to an SCS Linux machine such as our general purpose Linux hosts (linux.gp.cs.cmu.edu) or a Linux desktop built by SCS Computing  Facilities. You will also need one or more static Web files you wish to host on your Web site.

Preparation

You can choose to have the files for your website stored in your AFS user or project volume. Alternately, you can have the shortcut URL redirected to a website that you already have (external). The rest of the preparation section walks you through preparing your AFS user or project volume to house a website served via AFS by the main SCS Web servers.
NOTE: If you prefer to have your shortcut URL redirected to another URL you already manage, please submit a URL forwarding request.

Configure Web directory

We automatically create a www directory within your AFS user volume for you to use for your personal SCS Web site. This directory should be located at:
/afs/cs.cmu.edu/user/example/www/
For project directories, you will likely need to create this directory. You can do this by running this command:
mkdir /afs/cs.cmu.edu/project/example/www
Change in to this directory by running a command like the following from a Linux computer built by SCS Computing Facilities:
cd /afs/cs.cmu.edu/user/example/www/
If you receive a permission denied error, please use the klist and tokens commands to determine if you have the requisite Kerberos tickets and AFS tokens respectively. You can run the command kinit example@CS.CMU.EDU to obtain Kerberos tickets and AFS tokens. Enter your SCS Kerberos password when prompted.

Setting AFS permissions

You will need to make sure that the AFS ACLs are set up appropriately to allow the SCS Web server to access your Web files. Run these two commands to configure your user volume for Web access:

fs sa /afs/cs.cmu.edu/user/example wwwsrv:http-ftp l

fs sa /afs/cs.cmu.edu/user/example/www wwwsrv:http-ftp rl
The first command gives the SCS Web servers the ability to list your www directory. The second command gives the SCS Web servers the ability to read and list all of the files in your www directory. See AFS ACLs for more information about how AFS ACLs work.

You can confirm that the ACLs on your directories are appropriate by running these commands and looking for the expected output:
fs la /afs/cs.cmu.edu/user/example
This command should provide output like this:
Access list for /afs/cs/user/example is
Normal rights:
wwwsrv:http
-
ftp l
system:anyuser l
example rlidwka
Confirm that wwwsrv:http-ftp is listed with at least the l ACL.
fs la /afs/cs.cmu.edu/user/example/www
This command should provide output like this:
Access list for /afs/cs/user/example/www is
Normal rights:
wwwsrv:http
-
ftp rl
example rlidwka
example@andrew.cmu.edu rliw
Confirm that wwwsrv:http-ftp is listed with at least the rl ACL.

Notes on these changes

The entry for wwwsrv:http-ftp is a special AFS PTS group that contains the IP addresses of the main SCS Web servers (along with a few other hosts). See AFS ACLs for more information about AFS ACLs and PTS groups.

Transfer files to Web directory

You can create your website files directly in AFS or you can build the website elsewhere and transfer the files over to AFS. If your web files are on a machine that has direct access to AFS, you can simply use the cp command to copy the files. If you build the website elsewhere, you can use an SFTP client (like Filezilla) to connect to an SCS Linux computer (like linux.gp.cs.cmu.edu) and transfer the files from your computer to /afs/cs.cmu.edu/user/example/www or /afs/cs.cmu.edu/project/example/www.

Preview your site

If you have direct AFS access on your computer, you can preview your website by opening a web browser and visiting:
file://afs/cs.cmu.edu/user/example/www/index.html

Publication

Request a shortcut URL

Once you are satisfied with how your Web site looks, you can request to have the shortcut URL set up to point http://cs.cmu.edu/~example to your user or project Web site. When you are ready, submit a shortcut URL request, with the following information:

  • The path to the www folder in AFS that your files are located in
  • The SCS username or the name of the project (replaces 'example' in the URL above.)