The authhost module is a commercial module available from Omnipresence International. It is used to allow only hosts whose names or IP addresses match a regular expression access to parts of the server. It's first argument is the name of an html file to send if the host makeing the request is denied access, or a "-" if a standard "object not found" message should be sent. The second argument is an AmigaDOS regular expression that matches the hosts that will be allowed access to the rest of the maps on the server.
First the IP address of the host making the request is matched against the pattern; if that fails the host name is looked up and matched against the pattern; if that fails, either the html file named in the first argument is sent, or a status code 404 (object not found) response is sent. If either pattern match succeeds, the module returns an indicator that it did nothing, and the server continues searching the maps for something to handle this request.
As an example, to allow only the local host and hosts in the phone.net domain to access the /hidden/ directory, you would use the authhost and directory modules like so:
map /hidden/ authhost - (127.0.0.1|#?.phone.net) map /hidden/ directory work:secret-stuff/
If any host but the local host (IP address 127.0.01) or a host from the phone.net domain tried to access the /hidden/ URL, the authhost map will return a not found error. Otherwise, the following directory map will look in the secret-stuff directory for files.
If you wished to send the file work:secret-stuff/message.html instead of a not found message, you would use:
map /hidden/ authhost work:secret-stuff/message.html (127.0.0.1|#?.phone.net)
for the authhost map.
Kp>Since the authhost module denies access to any URL with the given prefix to those clients, it can be used in cases where you have multiple maps that require the same host authentication. For example, if you have a prerelease area that holds documents under development and a cgi directory, you could hide them both like so:map /prerelease/ authhost - 127.0.0.1 map /prerelease/cgi-bin/ cgi work:prerelease/cgi/ map /prerelease/ directory work:prerelease/