Difference between revisions of "TJ Website Adding Subsite Guide"

From Livedoc - The Documentation Repository
Jump to: navigation, search
m (Typo)
(RO copy of volume)
Line 15: Line 15:
  
 
  vos create -server adelie -partition vicepa -name web.magic -maxquota 102400
 
  vos create -server adelie -partition vicepa -name web.magic -maxquota 102400
 +
 +
In addition, a read-only copy of the volume should be created:
 +
 +
vos addsite -server <an AFS server> -partition <a partition on the server> -id <volume name>
 +
 +
The read-only copy should be added to the same server and partition used when initially creating the volume.
  
 
= Make an AFS Group =
 
= Make an AFS Group =

Revision as of 22:20, 14 May 2008

This guide should be followed when creating new websites for the various TJ domains, such as academics.tjhsst.edu, activities.tjhsst.edu, etc. For all AFS steps, you must be an AFS administrator. For the MySQL step, you need to have the MySQL root password.

Make an AFS Volume

As a general convention, the volume is named web.<group name>, regardless of the subdomain that the particular page will be under. The group name should be rather short, as there is a limit on the number of characters in a volume name. For instance, the senior computer team's volume is named web.sct.

To create an AFS volume:

vos create -server <an AFS server> -partition <a partition on the server> -name <volume name> -maxquota <quota in KB>

The quota for web volumes should be set at 100 MB (102400 KB). New web volumes should be placed on adelie, vicepa.

For example, to create an AFS volume for a club called magic:

vos create -server adelie -partition vicepa -name web.magic -maxquota 102400

In addition, a read-only copy of the volume should be created:

vos addsite -server <an AFS server> -partition <a partition on the server> -id <volume name>

The read-only copy should be added to the same server and partition used when initially creating the volume.

Make an AFS Group

The name of the AFS group should be the same as the volume, web.<group name>.

To make an AFS group:

pts creategroup -name <name of AFS group>

To add users to the new AFS group:

pts adduser -user <username> -group <name of AFS group>

Create an AFS Mountpoint

To create the mount:

fs mkmount -dir <directory> -vol <volume name>

Directory should, in general, be /afs/csl/web/<subdomain>/<group name>, where subdomain is the category under which the website will live, and group name is the name of the group (the same group name used in the volume and AFS group names, web.<group name>).

Apply AFS permissions

All web volumes should be readable by the webserver (user www-data). In addition, the group with permissions for the particular website, web.<activity name>, should have all AFS permissions on the directory.

Add the permissions with:

fs sa <path to volume> <username> <permissions>

For the webserver read permissions:

fs sa <path to volume> www-data read

For the web.<activity name> group:

fs sa <path to volume> web.<activity name> all

The path to the volume is the same directory used in the fs mkmount command above.