Web options for Unix and AFS users

The Web server running on www.dartmouth.edu (Webster) can not directly see the AFS file servers or serve pages from them, for security reasons. Another system, northstar-www, runs a web server which can directly serve pages out of users' AFS accounts.

The options for people who wish to have web pages but keep them in AFS and maintain them directly from Northstar accounts are:

  1. Make a public_html directory in your Northstar account and put your pages there. The machine northstar-www runs a web server and sees all the AFS server files, so your URL would be http://northstar-www.dartmouth.edu/~USERNAME

    Users do log in to northstar-www directly, but it sees all your files. All AFS account are automatically enabled on northstar-www. Make sure that your public_html directory is readable by the web server. To make sure that it is, run the command

    fs sa ~/public_html http_server rl
    or
    fs sa ~/public_html system:anyuser rl

    system:anyuser allows anyone to view any of the files. It is safer to allow access only from the machine on which the Web server runs (http_server)

    Advantages

    Disadvantages

  2. Apply for an account on Webster (http://www.dartmouth.edu/~apply) and use it the same way Macintosh users do. Maintain your pages in your AFS space and transfer (FTP) copies of them to Webster when they are changed. Note that tools such as xdir can transfer complete directory hierarchies with a drag-and-drop interface, so this is not really a disadvantage.

    Advantages

    Disadvantages

  3. Follow the instructions to serve pages off Northstar-www as in (1), and also obtain a Webster account as in (2). In your webster account, place a file named .htaccess (the leading "." is important) containing the lines:

    RewriteEngine on
    RewriteRule ^(.*)$ http://northstar-www.dartmouth.edu/~USERNAME/$1
    RewriteRule /data/public/./people/U/USERNAME/(.*)  http://northstar-www.dartmouth.edu/~USERNAME/$1
    

    Replace USERNAME by your own username (and U by the initial letter). This causes the web server on www to call northtar-www instead, for all requested pages.

    Advantage

    Disadvantages

There is no problem using a combination of these options, apart from complicating the file management.

Note that Webster and Northstar share usernames - your personal username is automatically the same on each system. Neither server directly runs arbitrary user CGI scripts. If you want to dabble with CGI scripts you should get an account on Webster, and then request a companion account on Cobweb by sending mail to Webmaster, requesting that your account be enabled on Cobweb. Cobweb is an experimental server, with the same configuration as Webster but less restrictive policies and intended for learning and developing web tools.

Web options for Unix and AFS users
For comments and questions, please contact Richard Brittain
Revised 02/12/13

Back to RC Help/FAQ page