vqServer: Aliases, files and directories


Web browsers usually ask web sites for files by name. vqServer interprets this name as an alias and translates it to the file's real name using an internal list. Each alias is also associated with information which tells vqServer how to handle the request.

There is a different list of aliases for each server. To display the aliases for the main web server, click on Aliases under Main web server in the control centre menu. To display the aliases for another server, click on Server in the control centre menu, then click on the name of the server you are interested in, then click on Aliases.

vqServer processes requests by finding the first entry in its list of aliases which matches the request. The part of the requested file name which matches the alias is replaced with the real name corresponding to the alias to determine the real name of the file requested.

For example, suppose that a web browser requests the file index.html form your web site. The first alias which matches index.html is the blank alias (the last alias in the standard list of aliases). The real name associated with the blank alias is public. vqServer therefore responds to the request by sending the file public/index.html where public is interpreted as a subdirectory of the website directory.

The information associated with each alias also determines how vqServer handles a request. There are four possibilities:

  1. Send file: just return the file requested.
  2. Redirect: redirect the request to the translated location. The real name must be something like http://path/filename.ext.
  3. Run java servlet: the servlet corresponding to the real name is loaded if necessary and run. The real name must be something like servletdirectory/packagename.classname.
  4. Run CGI program: runs the CGI script corresponding to the real name. The real name must be something like cgidirectory/progname.exe.

To summarise three important features of the alias system:

  • The name and location of the file vqServer sends in response to a request doesn't have to be related in any way to the name used in the request.
  • Two or more aliases can provide access to the same file or directory.
  • The order of aliases in vqServer's lists is important. The first alias which matches the request is used, even if another alias matches the request better.
vqServer
Register (free!)
Support

Contents

Servers and ports
Java servlets

Aliases page
Alias settings
Alias parameters

Aliases page

The aliases page for a server is displayed when Aliases in the server's options submenu of the control centre menu is clicked.

The New alias link in the menu on this page allows you to add a new alias to the list.

The following is displayed for each alias.

Alias

The name of the alias. This is what is compared with the name of a requested file.
Action How vqServer handles a request which matches this alias.

Real name

The part of the request which matches the alias is replaced with this to determine the real file name.
Settings Displays the settings for this alias.
Parameters Displays the parameters for this alias.
Moves the alias up the list.
Moves the alias down the list.
Delete Deletes the alias.
Control centre menu

vqServer
Contents
Aliases

Servers and ports
Java servlets

Alias settings

This form is displayed when a Settings icon is clicked in an aliases page. It provides control over the main characteristics of an alias.

Alias

The name of the alias. This is what is compared with the name of a requested file.

Real name

The part of the request which matches the alias is replaced with this to determine the real file name.

Default file

If a request translates to the name of a directory instead of a specific file, vqServer looks for the default file in the directory and sends it if available. This is the mechanism by which visitors to your web site are sent your index.html file if they don't specify a particular file in their request.

Action

How vqServer handles a request which matches this alias.

Allow directory listings

If a request corresponds to the name of a directory instead of a specific file and the default file is blank, this check box determines whether vqServer responds by sending a directory listing.

Access control list

If this is not Anyone, vqServer restricts access to files and directories matching this alias to persons listed in the access control list. See the security page.

Choosing New ACL here creates a new access control list, restricts access to files and directories matching this alias to persons listed in the new access control list and takes you to the new access control list's settings page when the Ok button is pressed.

Previous alias

This drop-down list provides a quick way of moving an alias to another position in the list of aliases. When you click the Ok button, the alias will be moved to the position specified.
Control centre menu

vqServer
Contents
Aliases

Servers and ports
Java servlets

Alias parameters

Each alias is associated with a list of parameters. Parameters are meaningful only in the context of Java servlets and CGI scripts:

  • Java servlets: The alias parameters are treated as servlet initialisation parameters which can be accessed using the getParameterNames() and getParameter() methods of the ServletConfig interface. See JavaSoft's servlet documentation for more information about these methods.
  • CGI scripts: The alias parameters are passed to the script as environment variables.

To display the parameters associated with an alias click on the icon in the Parameters column next to the alias in a list of aliases.

The buttons underneath the list of parameters are as follows:

  • New parameter: Add a new parameter to the list. A form allowing editing of the new parameter is displayed. A new parameter can also be added to the list by clicking on the New parameter link in the control centre menu for this page.
  • Edit parameter: Allows editing of the selected parameter. A page allowing editing is displayed.
  • Delete parameter: Deletes the selected parameter from the list.


vqServer version 1.03. Copyright © 1997-98 vqSoft and Steve Shering. Last updated 27 May 1998.
Control centre menu

vqServer
Contents
Aliases

Servers and ports
Java servlets