Skip to main content

You may be using a Web browser that does not support standards for accessibility and user interaction. Find out why you should upgrade your browser for a better experience of this and other standards-based sites...

Dartmouth Home  Search  Index

Dartmouth Home | Search | Index

Dartmouth home page
Computing at Dartmouth
Computing > Support >  Library >  Research > UNIX > Files > AFS >

Web Options for UNIX and AFS Users

The Web server running on www.dartmouth.edu cannot directly see the AFS file servers or serve pages from them for security reasons. Another system, northstar-www, runs a Web server that can directly serve pages out of a user's AFS (Northstar) account.

There are options available for people who want to have Web pages, but keep them in AFS and maintain them directly from a Northstar account.

Option 1

Make a public_html directory in your Northstar account and put your pages in that directory. 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 can log in to northstar-www directly, but it sees all your files. All AFS accounts are automatically enabled on northstar-www. Make sure your public_html directory is readable by the Web server. To make sure 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

  • Files are easily edited directly from any Northstar machine (or any other machine with an AFS client installed).
  • Can use the Web development tools on the UNIX workstations to better advantage.

Disadvantages

  • Slightly less efficient; files get pulled over the network twice.
  • URL is not www.dartmouth.edu.

Option 2

Apply for an account on www.dartmouth.edu and use it the same way Macintosh users do. Maintain your pages in your AFS space and transfer (FTP) copies of them to www.dartmouth.edu 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

  • URL is www.dartmouth.edu/~USERNAME.
  • Extra disk allocation just for Web pages.
  • Faster server.

Disadvantages

  • FTP access only - You have to edit off-line, then upload the pages.

Option 3

Follow the instructions to serve pages off Northstar-www as in Option 1 and obtain a www.dartmouth.edu account as in Option 2. In your www.dartmouth.edu 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 with your own username (and U by the initial letter). This causes the Web server on www to call northstar-www instead for all requested pages.

Advantage

  • The URL is www.dartmouth.edu/~USERNAME.

Disadvantages

  • Less efficient. You will need to contact both servers, then pull a file over the network as for the pure Northstar-www option.

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

Note: www.dartmouth.edu 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 www.dartmouth.edu, then request a companion account on www by sending an e-mail to webmaster@dartmouth.edu, requesting your account be enabled on www. Www is an experimental server, with the same configuration as www.dartmouth.edu, but less restrictive policies and intended for learning and developing Web tools.

05/08/08

Last Updated: 5/9/08