How to create your custom listener.xml
Template for your custom listener.xml
Tags for defining an application server instance
How to manipulate your application server instances
How to overwrite default (global) configurations for CSP directives
listener.xml is a file where you can define and configure application server instances.
listener.xml is not created by Querix Package Manager.
By default, Lycia comes with two application instances:
So, if you do not create your custom listener.xml, Lycia default settings for the application server are:
application server working directory (i.e., 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:
If necessary, you can create your custom application server instances. For example, you need several custom application server instances if you use different working directories and different sets of environment variables for different projects.
If yes, you must create custom listener.xml where you will define and configure these custom application server instances.
To create custom listener.xml, please follow these steps:
Step 1. Close LyciaStudio (if necessary).
Step 2. Stop Lycia Web Server.
Step 3. Open your favorite text editor.
Step 4. Copy the template given below to a new text 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>
<basic_realm>my.domain.name</basic_realm>
<wait_for_client_to_connect>150</wait_for_client_to_connect>
</service>
...
We recommend using these folders 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 it in LISTENERXML:
If you have several custom configuration file (including listener.xml), you must set a path to your listener.xml in LYCIA_CONFIG_PATH:
Step 7. Start Lycia Web Server.
Step 8. Restart LyciaStudio (if necessary).
You can create as many application server instances as you need.
But all these instances must be added to one and the same listener.xml file.
If you want to keep one or both default application server instances and use them together with your custom ones, you must copy their definition to your custom listener.xml.
<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>
<basic_realm>qx.ua</basic_realm>
</service>
</xml>
When you define your custom application server instances, you must set values to all the tags:
<xml>
<service>
<name>...</name>
<applicationdir>...</applicationdir>
<logdir>...</logdir>
<envfile>...</envfile>
<authmode>...</authmode>
<auth_module>...</auth_module>
<logging>...</logging>
<description>...</description>
<enabled>...</enabled>
<basic_realm>...</basic_realm>
<wait_for_client_to_connect>...</wait_for_client_to_connect>
</service>
</xml>
If necessary, you can copy them from here.
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 which define application server instances:
<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)
<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.
To modify an existing AppServer instance, please follow these steps:
Step 1. Close LyciaStudio (if necessary).
Step 2. Stop Lycia Web Server.
Step 3. Open listener.xml in any text editor.
Step 4. Introduce the necessary changes to one of the existing <service>...</service> blocks.
Step 5. Save the changes.
Step 6. Start Lycia Web Server.
Step 7. Restart LyciaStudio (if necessary).
To delete an existing AppServer instance, please follow these steps:
Step 1. Close LyciaStudio (if necessary).
Step 2. Stop Lycia Web Server.
Step 3. Open listener.xml in any text editor.
Step 4. Select and delete one of the existing <service>...</service> blocks.
Step 5. Save the changes.
Step 6. Start Lycia Web Server.
Step 7. Restart LyciaStudio (if necessary).
The default setting of the directives hardcoded in LyciaWeb.war:
default-src 'self' script-src 'self' 'unsafe-inline' 'unsafe-eval' https: blob: img-src * data: frame-src * connect-src * data: blob: style-src * 'unsafe-inline' media-src * font-src *
Lycia installation maintainer can configure a global set of CSP directives, by setting custom policy values in:
<xml> ... <content_security_policy>...</content_security_policy> ... </xml>
The global set above applies to every service in listener.xml.