VWcms Site Configuration
 

Logical Name

The site logical name beginning VWCMS_SITE_ and ending with the site name is used to specify a site's content file.  This file is by convention named _INDEX.HTML and for Vdub the resulting logical name looks something like:

$ SHOW LOGICAL VWCMS_SITE_VDUB /FULL
"VWCMS_SITE_VDUB" = "VWCMS_ROOT_VDUB:[VDUB]_INDEX.HTML" (LNM$SYSTEM_TABLE)

From this logical name the location of other site resources (images, downloadable content, etc.) also is derived.

In this example it is the slightly confusing VWCMS_ROOT_VDUB:[VDUB].  The VWCMS_ROOT_VDUB concealed logical name is used to provide a server-independent (Apache, OSU, WASD) location.  For WASD this logical name translates

"VWCMS_ROOT_VDUB" = "DKB100:[HT_ROOT.SRC.VWCMS.]" (LNM$SYSTEM_TABLE)

Hence to create a site named "The Example" physically located in the top-level directory of the defined VWcms area (see Configuration) the following logical name would need to be defined:

$ DEFINE /SYSTEM VWCMS_SITE_THE_EXAMPLE VWCMS_ROOT:[THE_EXAMPLE]_INDEX.HTML

Of course to make this permanent the name would need to be defined during system startup.

Mapping Rules 1

The site's URL must be mapped into server space.

Apache
<Location /the_example/>
RewriteEngine  on
RewriteRule  /the_example/(.*)  /cgi-bin/vwcms/the_example/$1
</Location>
OSU map /the_example/* /vwcms/dka0/the_example/*
script /vwcms/* /htbin/vwcms/*
WASD map /the_example/* /vwcms/dka0/the_example/*
script+ /vwcms/* /cgi-bin/vwcms/*

The script rule for OSU and WASD is only required the once per VWcms.

Mapping Rules 2

VWcms only provides content from the _INDEX.HTML primary content file.  For efficiency all other site resources (CSS, images, graphics, etc.) are provided directly by the Web server.  This requires it to be configured for where to obtain these files.  VWcms uses the site name prefixed by an underscore as the root of the resource path.  Using the above "The Example" site, a graphic resource would be requested using

/_the_example/an_image.png

Therefore for each site a rule must be present that maps this to the file-system location.

Apache alias "/_the_example/" "/dka0/the_example/"
OSU pass /_the_example/* /dka0/the_example/*
WASD pass /_the_example/* /dka0/the_example/*

Of course this is in addition to other required mapping rules.


WASD Mapping Example

Of course these are all combined to support multiple sites (if required) in a single set of VWcms mapping rules for each server.  For example, consider the three sites, "Recipes Galore", "Yet More Recipes", and "Dieter Delights", along with the Vdub documentation site.  This is a practical mapping rule set for WASD.

pass /_recipes_galore/* /vwcms_root/recipes_galore/*
map /recipes_galore/* /vwcms/recipes_galore/*
map /recipes_galore /vwcms/recipes_galore/

pass /_yet_more_recipes/* /vwcms_root/yet_more_recipes/*
map /yet_more_recipes/* /vwcms/yet_more_recipes/*
map /yet_more_recipes /vwcms/yet_more_recipes/

pass /_dieter_delights/* /vwcms_root/dieter_delights/*
map /dieter_delights/* /vwcms/dieter_delights/*
map /dieter_delights /vwcms/dieter_delights/

script+ /vwcms/* /cgi-bin/vwcms/*

Site Content

Into the site directory the requires seed files need to be copied.  Seed files contain the essential elements of a VWcms site infrastructure and although all can be created manually from scratch this is a quicker route to a basic site.

$ COPY [.EXAMPLE1]*.* DKA0:[THE_EXAMPLE]

At this point the germinal site may be accessed using a path

/the_example/