listener.xml is a file where you can define and configure application server instances. By default, the listener.xml file is not created by Querix Package Manager. Create one to store non-default configurations.
By default, Lycia comes with two application instances:
Windows and root user on
Linux/UNIX;Default instances have the following parameters:
<xml>
<service>
<name>default</name>
<applicationdir>C:\ProgramData\Querix\Lycia\progs</applicationdir>
<logdir>C:\ProgramData\Querix\Lycia\logs</logdir>
<envfile>C:\ProgramData\Querix\Lycia\etc\inet.env</envfile>
<authmode>none</authmode>
<auth_module>modauthnt.dll</auth_module>
<logging>true</logging>
<description>Default no authentication
listener</description>
<enabled>true</enabled>
</service>
<service>
<name>secure</name>
<applicationdir>C:\ProgramData\Querix\Lycia\progs</applicationdir>
<logdir>C:\ProgramData\Querix\Lycia\logs</logdir>
<envfile>C:\ProgramData\Querix\Lycia\etc\inet.env</envfile>
<authmode>full</authmode>
<auth_module>modauthnt.dll</auth_module>
<logging>true</logging>
<description>Default full authentication
listener</description>
<enabled>true</enabled>
</service>
</xml>
With no custom listener.xml, Lycia default settings for the application server are:
application server working directory (that is, where programs will be deployed and executed):
logging directory (i.e., the folder to which log files are saved):
default location for custom inet.env:
default authentication library:
You may need several custom application server instances - for example, if you intend to use different working directories and different sets of environment variables for different projects. Configure these custom application server instances in you listener.xml file.
To create custom listener.xml, follow these steps:
Step 1. Stop Lycia Web Server;
Step 2. In your VS Code's Workspace area, open the etc folder within the LYCIADIR. By default, the paths should be:
We recommend using the default folder listed in Step 2 to save your custom configuration files.
If this default folder doesn't suit your development and production needs, you can store your custom configuration files in any other location.
In this case you must add the path to listener.xml as a value of LISTENERXML or LYCIA_CONFIG_PATH environment variables.
If you have only one custom configuration file and it is listener.xml, you may set the path in LISTENERXML:
If you have several custom configuration files (including listener.xml), you must set a path to your listener.xml in LYCIA_CONFIG_PATH:
The file will open in the Editor area;
Step 4. Copy the template given below to this file;
To define your instance, you must set values between the tags.
For example,
...
<service>
<name>my_instance</name>
<applicationdir>C:\my_projects\progs</applicationdir>
<logdir>C:\my_projects\logs</logdir>
<envfile>C:\my_projects\my_configs\my_environment</envfile>
<authmode>full</authmode>
<auth_module>modauthnt.dll</auth_module>
<logging>true</logging>
<description>My custom application server instance</description>
<enabled>true</enabled>
<wait_for_client_to_connect>150</wait_for_client_to_connect>
</service>
...
Step 7. Start Lycia Web Server.
Attention: You can create as many application server instances as you need. Yet, all these instance definitions must be added to the same listener.xml file.
When you define your custom application server instances, you must set values to all the following tags:
<xml>
<service>
<name>...</name>
<applicationdir>...</applicationdir>
<logdir>...</logdir>
<envfile>...</envfile>
<authmode>...</authmode>
<auth_module>...</auth_module>
<logging>...</logging>
<description>...</description>
<enabled>...</enabled>
<wait_for_client_to_connect>...</wait_for_client_to_connect>
</service>
</xml>
When setting <auth_module></auth_module> for
, you can use one or more of the authentication libraries supported by Lycia – modauthcrypt.so, modauthshadow.so, or modauthpam.so.
These are the tags with that define application server instances:
<wait_for_client_to_connect>...</wait_for_client_to_connect> specifies the time (in seconds) during which Lycia WebServer waits for the client to connect (by default, it is 10 s). You can learn about client-server interactions here: Client-Server Interactions.
<sso>...</sso> switches on the Kerberos protocol for SSO authentication - can be not set, false, or true:
if not set in listener.xml or set to false, standard authentication procedure will be used;
if set to true, LyciaWeb will try to go through the SSO authentication (and will ask for standard authentication procedure with entering user name/password only in case SSO authentication fails);
Optional tags:
You can configure the attributes of cookies in listener.xml file. You can set any combination of these attributes in the <cookie_attributes> tag and it is up to web browser to accept or decline resulting cookies.
If they are not configured, the default behaviour is:
For secure scheme (application URL starts with https://) cookie attributes are set as follows: http-only=”yes”, secure="yes", same-site=”none”;
The configuration is the following: set cookie attribute values in the cookie_attributes tag. Example:
<cookie_attributes http-only=”true” secure=”true” same-site=”None” />
| Attribute | Value |
| same-site | None, Lax, Strict. |
| http-only | true / false or yes / no |
| secure | true / false or yes / no |
Attribute names are case-sensitive (lowercased). Attribute values are case-insensitive (Lax and lax are equivalent, Yes and yes too).
The content security policies are specified withing the <content_security_policy> tag:
<xml> ... <content_security_policy>...</content_security_policy> ... </xml>
The default set of the directives, hardcoded in LyciaWeb.war:
connect-src 'self' data: blob:
style-src 'nonce-<autogenerated hash>' 'strict-dynamic' 'self'
script-src 'nonce-<autogenerated hash>' 'strict-dynamic' 'self' https: blob:
object-src 'self'
form-action 'self'
frame-src 'self' data: blob:
media-src 'self'
frame-ancestors 'self'
img-src 'self' data: blob:
default-src 'self'
font-src 'self' data:;
Should you need to set other values, set custom policy values in:
<xml> ... <content_security_policy>...</content_security_policy> ... </xml>
For a generated HTML page at a program runtime, you can specify the page language for the purpose of better accessibility within the tag <html_lang> in the following format: <language[_country]>. For example, for the German language and Germany, add the following:
<xml>
...
<html_lang>de_DE</html_lang>
...
</xml>
To modify an existing AppServer instance, follow these steps:
Step 1.Stop Lycia Web Server.
Step 2. Open listener.xml in your VS Code instance and add necessary changes to one of the existing <service>...</service> blocks.
Step 3.Start Lycia Web Server.
To delete an existing AppServer instance, please follow these steps:
Step 1.Stop Lycia Web Server.
Step 2. Open listener.xml in your VS Code instance.
Step 3. Select and delete one of the existing <service>...</service> blocks.
Step 4. Start Lycia Web Server.