Handlers

warning

It is not recommended to change the settings of this section, except Access and Authorization subsections, without technical support instructions.

In the Handlers section, you can configure the way how and in what environment client request will be processed.

General

Settings are available depending on the handles type.

For web sockets, necessary handler is selected depending on the Protocol attribute.

For the rest of handlers types, necessary handler is selected depending on the Prefix attribute.

Types of handlers to use are selected in the Type drop-down list:

Handlers

Selected script is executed with the path from URL as a parameter. If the path is absent, the path of the Directory field is used.

Prefix—prefix of the path in the URL of HTTP request.

Directory—directory in the root of the web server relative to which the paths to the files to be transferred are considered.

Script—processing script.

Mixed handlers

Depending on the type of the requested file, behaves like the Static files type or the Scripts type.

Prefix—prefix of the path in the URL of HTTP request.

The list of index files. Defines which files in what order will be downloaded if web client requests a directory index.

Script—the list of file extensions to consider as Lua scripts.

Scripts

Any requested file is executed as Lua script.

Prefix—prefix of the path in the URL of HTTP request.

Directory—directory in the root of the web server relative to which the paths to the files to be transferred are considered.

Static files

Files content is given as it is.

Prefix—prefix of the path in the URL of HTTP request.

Directory—directory in the root of the web server relative to which the paths to the files to be transferred are considered.

The list of index files. Defines which files in what order will be downloaded if web client requests a directory index.

Virtual file system

Analogue of the Static files type, but files are loaded from the archive of the dar internal format, specified in the Directory field.

Prefix—prefix of the path in the URL of HTTP request.

Directory—directory in the root of the web server relative to which the paths to the files to be transferred are considered.

Predefined web sockets

Websocket application implemented by the shared library supplied with the server (dll or elf shared object). The library file name corresponds to web socket protocol, files are located inlib-root/websockets.

Authorization script—name of the Lua script file that authorizes a user.

Protocol— the WebSocket-Protocol field value that is transmitted in the HTTP request for connection to web socket.

User-defined web

Websocket application implemented by the Lua script. The script file name corresponds to web socket protocol, files are located inhome-root/websockets.

Authorization script—name of the Lua script file that authorizes a user.

Protocol— the WebSocket-Protocol field value that is transmitted in the HTTP request for connection to web socket.

Access

Access Control Lists (ACL) specify restrictions for network addresses from which clents will be able to access the web server.

Settings are the same as Dr.Web Server security settings.

If the settings are not specified, all addresses are allowed.

Authorization

Available for all types of hadlers except web sockets.

The section settings define the list of resources for requests to which the basic http authentication must be requested from the web client.

Realm—value that the web server passes to a client in the WWW-Authenticate: Basic realm="ADMIN" parameter. Generally, it is a short description of who should be authorized. It has not relation with a login.

To setup access limitations for any of connection type

1.To allow free access at clients connection via HTTP or HTTPS to a certain paths, add these paths to the HTTP: free access or HTTPS: free access lists correspondingly.

2.To request authorization at clients connection via HTTP or HTTPS to a certain paths, add these paths to the HTTP: require authorization or HTTPS: require authorization lists correspondingly.

3.When accessing paths that are not included into any of the lists, authorization is requested or not depending on whether the Authorization request priority flag is set: if the flag is set, to access paths not included into any of the lists (or included into both of them) authorization is required. Otherwise, access to such paths is free.

To edit the address list

1.Specify a regular expression that defines the path relative to the directory specified in the Directory field.

2.To add a new field, click icon-item-add in the corresponding section.

3.To delete a field, click icon-item-remove.