Site Valet Modules

A suite of modules provides Web-based client access to a Site Valet database. A full Site Valet installation includes WebÞing's modules and associated utilities for forms handling and XSLT presentation in addition to these modules and the Site Valet spider and automatic analysis tools.

mod_valet_utils

This small module exports simple utilities used by the other modules, including:

Configuration

ValetTemplate name [file|literal] value
Defines name as an HTML fragment. If the second argument is file, it is defined to be the contents of the filename value. Otherwise value is taken to be a literal HTML fragment.

mod_valet_sql

Manages a dynamically-resizable pool of shared database connections, using Valet's abstract base class "SQL".

This is the original work that led to the DBD Framework, which may replace it in a future release. It is also the first implementation of connection pooling for efficient database access in a highly scalable threaded environment.

Prerequisites

Configuration

mod_valet_report

This is the main Site Valet Reporting Web Component, and duplicates the core Browse and Query functions of the Valet Client application:

Prerequisites

Configuration

These configuration directives are optional. If they are present, they will be used to include links for live re checks of validity, accessibility and links in appropriate query results and browse pages.

ValetPageURL http://example.com/validate?url=
URL to validate a page. This could in principle be any formally-rigorous validator.
ValetAccessURL http://example.com/access-check?url=
URL to check accessibility. This could in principle be any tool, but should be your locally installed AccessValet unless you are using a highly customised system.
ValetLinkURL http://example.com/links-check?url=
URL to check links. It is probably not a good idea to have the link checker configured to spider deeply!

mod_valet_admin

This is the main Site Valet Administration Web Component, and duplicates the core admin functions of the Valet Client application.

Note that this excludes the system start/stop/hup/suspend/resume functions, which require a suexec CGI program (not recommended) to run from the Web.

Prerequisites

Security

GET requests reveal some details of the system but are essentially harmless. POST requests modify the system and should be secured.

mod_valet_publish

This module drives the Site Valet Publisher web component. It accepts XML documents uploaded by a Valet Client using POST or PUT, and serves them using GET. It provides users with a choice of report formats using XSLT.

Prerequisites

Security

It is strongly recommended that POST and PUT requests be password-protected.

Operations

POST a document

POST /post-handler HTTP/1.0
Content-Type: application/xml
Content-Length: [required]

mod_valet_publish will upload the document and assign it a URL. It will return HTTP status code 201 (created) with a Location: header indicating the URL for the document posted. On error it returns HTTP status 500.

PUT a document

PUT /reports/name-of-existing-file HTTP/1.0
Content-Type: application/xml
Content-Length: [required]

This is similar to POST, except in that it overwrites an existing document instead of creating a new one, and returns HTTP status 204 for success.

GET a URL

GET /reports/name-of-existing-file.ext HTTP/1.0

This returns a document previously created. If the URL has an exension configured using ValetPublishFormat the document will be transformed using XSLT. The Site Valet Publisher component comes preconfigured to serve HTML and EARL as well as XML.

Configuration Directives

SetHandler valet-publish /publish
Specify a URL for the POST handler.
ValetPublishDir /var/local/valet/reports
The filesystem path for a directory to save reports to. Must be writable by the webserver.
ValetPublishURL /reports
A base URL for published reports. GET, HEAD and PUT requests to URLs under here will be handled by the module.
ValetPublishFormat html text/html /usr/local/valet/share/html.xsl
If /foo is a document, this directive causes GET/HEAD requests for /foo.html to be transformed using a stylesheet /usr/local/valet/share/html.xsl and served as text/html.