JANUS DISPLAYWEB: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (1 revision)
(No difference)

Revision as of 00:13, 1 July 2011

<section begin="desc" />Display rules in effect for a port.<section end="desc" />

This command displays the rules in effect (the active rules) for a specified WEBSERV port.

JANUS DISPLAYWEB [portname] [ruletype [url] ]

JANUS DISPLAYWEB command syntax

Where:

portname identifies the WEBSERV port whose rules are to be displayed. It can contain wildcards so that rules for multiple ports can be displayed with a single command. Portname is optional; if omitted, all rules for all WEBSERV ports are displayed.

ruletype is the type of web rules to be displayed. Valid types are ALLOW, ON, REDIRECT, SCREEN (in version 5.0 and later of Sirius Mods), and TYPE. Ruletype is optional; if omitted, all rules for portname are displayed.

Note that ALLOW will also display DISALLOW rules, and REDIRECT will also display NOREDIRECT rules.

JANUS DISPLAYWEB output is in the form of a series of JANUS WEB commands, and may be captured for re-execution with a Model 204 USE command or with a Sirius daemon object.

JANUS WEB commands are not shown if they were made obsolete by subsequent commands. The JANUS DISPLAYWEB command only shows rules that are active.

DISWEB is a valid abbreviation for DISPLAYWEB. For example,

JANUS DISWEB OZ*

shows the rules in effect for all WEBSERV ports whose names begin with “OZ”, would dislay web rules for all ports with names beginning with ‘WEB’ while

JANUS DISWEB

would display web rules for all web ports.

To see all rules that control access to URL's on port OZSEC, simply type JANUS DISWEB OZSEC ALLOW

In Sirius Mods version 6.2 and later it is possible to specify a URL in the JANUS DISWEB command as in JANUS DISWEB MAGIC ON /HOUSECUP/STANDINGS If the URL, as in this example, contains no wildcards, all rules that might apply to the URL are displayed but it is the last one displayed that would actually be applied to the URL should the URL be requested. If the URL specified in the JANUS DISWEB command contains one or more wildcards such as

JANUS DISWEB MAGIC ON /HOUSECUP/*

all rules that might apply to any URL that matches the wildcard URL are displayed, that is an rule that is a subset or superset of or has an overlap with the indicated rule. In the above example, rules that would be displayed could include

JANUS WEB MAGIC ON * CMD 'GENERIC' JANUS WEB MAGIC ON /HOUSE* CMD 'HOUSE *' JANUS WEB MAGIC ON *.GIF OPEN FILE IMAGES SEND *.GIF JANUS WEB MAGIC ON /HOUSECUP/STANDINGS CMD 'CUP STANDINGS'

Specifying a specific URL in a JANUS DISWEB command can help determine which rules would apply to that URL. Specifying a wildcard URL in a JANUS DISWEB command can help determine which set of commands might apply to a set of URLs though the results might be confusing if JANUS WEB rules of a particular type (ON, REDIRECT, TYPE, ALLOW, DEBUG) contain a mix of rules that contain fixed prefixes (like /FOO/*) and suffixes (like *.HTML). Mixing prefix and suffix rules is, in any case, a good formula for confusion so is best avoided if possible.

See: Janus command list