RealityServer Configuration

General Directives

The following directives configure the general behaviour of RealityServer.

include

Description Includes other files or directories into the RealityServer configuration
Syntax include path
Context global
Default none

This directive allows inclusion of other configuration files or directories of configuration files. If a directory path is given then all files in that directory are included in alphabetic order. Note that directory trees are not traversed, sub-directories need to be explicitly included. If a relative path is given then it is resolved relative to the configuration file containing it.

Note that include directives are only evalulated in the global context. If used inside a container directive it will be interpreted as a sub-directive of that container.

mime_types

Description Specifies a file containing mime-type definitions
Syntax mime_types filename
Context global
Default none

The name of a file the contains mappings from file name extensions to MIME types, which tell the browser what to do with the data. The file follows Apache syntax: lines beginning with # are comments; all others begin with a MIME type name followed by one or more space separated extensions, all case-insensitive.

add_mime_type

Description Adds a mime type description
Syntax add_mime_type extension type
Context global
Default none

An alternative to using a mime types file is to add them using this directive. Extensions added with this directive will override ones added in a mime_types file. Note that unlike the mime_types file only one extension can be specified per directive. Use multiple directives to associate multiple extensions with a single mime-type.

content_root

Description Specifies the root directory for all content
Syntax content_root directory-path
Context global
Default none

content_root specifies the directory which is the root of all content. The directory-path argument is the path this directory. Incoming URLs (after processing by a state module) are mapped directly into this path.

admin_address

Description RealityServer admin page address
Syntax admin_address [ip_address:]port
Context global
Default none

The address and port number, separated by a colon, or only the port number, that RealityServer accepts administration requests on. The address 0.0.0.0 means "any interface"; other addresses identify a network interface. The administration console is for system administrators only, to monitor the operation of RealityServer; it should under no circumstances be made available on a public network).

IPv6 addresses can also be specified but have to be surrounded with '[' and ']' to make it possible to disambiguate if a port is specified or not. The [::] is the IPv6 version of the ``any interface''. An example of binding to a specific address on port 8081 would be [fd00:172:16::b9]:8081.

While the admin server is disabled by default the realityserver.conf that ships with RealityServer does configure the admin server to run on port 8081. You should remove this directive from your realityserver.conf file before deploying your application to production.

The special port number "0" may be specified and RealityServer will pick a random, available port to use.

On startup a log message is emitted with the system_resource tag and a code value of 35 containing the admin server listen address. The webhook log handler facility can then be configured to forward this message to another service to advertise the configured address.

admin_address_internal

Description Neuray library admin page address
Syntax admin_address_internal ip_address[:port]
Context global
Default 127.0.0.3:8091

The address and optionally port number, separated by a colon, to run the internal neuray admin server on. If no port number is supplied then one will be chosen semi-randomly. Note that unlike the admin_address this directive cannot use the "any interface" as the RealityServer administration server needs to be able to connnect to the neuray one interally. It is not expected that the user would ever connect directly to this address, hence the use of the obscure 127.0.0.3 loopback IP as the default. Note that if the admin address is bound to the "any address" then this address cannot use the same port.

IPv6 addresses can also be specified but have to be surrounded with '[' and ']' to make it possible to disambiguate if a port is specified or not. The internal admin address will not be used if the admin server is not enabled.

<user>

Description Encloses a group of user defined directives.
Syntax <user value> ... </user>
Context global

<user> and </user> are used to enclose a group of user defined configuration directives. These directives are not subjected to any validity checks other than that they conform to the general directive syntax. They are ignored by RealityServer and simply made available to user extensions via mi::rswservices::IConfiguration::get_user_configuration(const char *value). This way any user extension that requires configuration can simply add their configuration to the main file inside a plugin defined user directive and retrieve it when the extension is initialized.

Note that echo, ifdef, ifndef and endif are not supported as directives within user directives as they are processed by the configuration file parser.