JANUS DISPLAYWEB

From m204wiki
Jump to navigation Jump to search

Display rules in effect for a port.

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

Syntax

JANUS DISPLAYWEB [portname] [ruletype [url] ]


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 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, while

JANUS DISWEB

would display web rules for all web ports.

To see all rules that control access to URLs 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, any 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 also