NAME
hosts.conf - Access control for Network UPS Tools CGI programs
DESCRIPTION
The CGI programs (upsset.cgi(8), upsstats.cgi(8), upsimage.cgi(8)) use this file to determine if they are allowed to talk to a host. This keeps random visitors from using your web server to annoy others by creating outgoing connections.
IMPORTANT NOTES
-
Contents of this file should be pure ASCII (character codes not in range would be ignored with a warning message).
-
This file does not contain passwords. Read-only monitoring in NUT is anonymous, and the upsset.cgi(8) program asks for credentials in the browser session when commanding a particular UPS (web-server should be secured, as reported to the program by upsset.conf(5) file).
DIRECTIVES
- MONITOR ups description
-
The ups element is in the form
upsname[@hostname[:port]].To allow connections to an UPS called "snoopy" on a system called "doghouse" that runs
upsdon port 7877, it would look like this:MONITOR snoopy@doghouse:7877 "Joe Cool"The description must be one element, so if it has spaces, then it must be wrapped with quotes as shown above. The default hostname is "localhost".
-
AUTHCONF (filename |
default|none) -
Optional nutauth.conf(5) file location to use for this client. A non-absolute path is treated as relative to NUT configuration directory.
Special values:
-
default: require a default file in one of the locations listed in nutauth.conf(5) (fail if none is found or accessible); -
none: do not try to find or load any such file.If AUTHCONF is not specified at all, best-effort (non-fatal) detection of a default file is attempted.
Such a file allows the single upsstats.cgi(8) client process to assume different certificate identities per connection, and helps it trust (and be trusted by) NUT data servers in separate security management realms.
-
- CUSTOM_TEMPLATE_LIST filename
- CUSTOM_TEMPLATE_SINGLE filename
-
upsstats.cgi(8) allows to use custom HTML template files for some of its outputs (JSON and "treemode" mark-ups are currently hard-coded in the binary), which you can specify in the query string part of the URI (in your
index.htmland/or added cells ofheader.html) as e.g.
.../cgi-bin/upsstats.cgi?template_single=custom-s.htm&template_list=custom-l.htm
+
Specific file names for a specific role must be permitted with these
directives (can be repeated). File names must contain the .htm sub-string
and must be located directly in the NUT configuration directory (same as
default templates). If custom templates are used in the original request
URI, they will be automatically suffixed to generated links (primarily
HOSTLINK, but also just in case added to TREELINK and TREELINK_JSON,
see upsstats.html(5) for more details).
SEE ALSO
Internet resources:
The NUT (Network UPS Tools) home page: https://www.networkupstools.org/