Directory structure

A web application base on this framework uses two directories:

  • /opt/DOMAIN for static files
  • /var/opt/DOMAIN for dynamic files

Note that the framework itself can be installed to standard directories like /usr or /usr/local.

Static

In the static directory /opt/DOMAIN there are:

  • bin for utility programs
  • etc for configuration files
  • include contains C/C++ header files
  • init.d startup/shutdown scripts for daemons
  • lib dynamic libraries
  • mails mail files in XSLT format
  • sbin for daemons
  • web web root directory

Dynamic

In the dynamic directory /var/opt/DOMAIN there are:

  • db SQLite databases
  • log log files
  • run daemon pid files
  • sock UNIX domain sockets

Configuration files

In the configuration directory /opt/DOMAIN/etc there are:

  • appd.env configuration for application daemon
  • cgi.env configuration for CGI
  • db.env which database to use
  • dbproxyd.env configuration for database proxy daemon
  • mta.env which mail system to use
  • sessiond.env configuration for the session daemon
  • soap.env where to find soap servers

See example/env of the distribution for sample configurations.

Daemon configuration

Each daemon (appd, dbproxyd, sessiond) reads its configuration file under /opt/DOMAIN/etc. The following general configuration variables exist:

  • PORT sets the TCP port on which the daemon accepts connections. If this variable is omitted or empty, TCP connections are not possible
  • UNIXSOCKET is the name of the UNIX domain socket in /var/opt/DOMAIN/sock on which the daemon accepts connections. If this variable is omitted or empty, UNIX domain socket connections are not possible
  • THREADS_MIN minimum number of threads in the thread pool that handle client connections
  • THREADS_MAX maximum number of threads in the thread pool that handle client connections. Additional connections wait in a FIFO queue until the next thread becomes available
  • LOGLEVEL log level for logfile /var/opt/DOMAIN/log/DATE-HOST-DAEMON.log
    Possible log levels: 1=FATAL, 2=ERROR, 3=WARN, 4=NOTICE, 5=INFO, 6=DEBUG. Log levels 5 and 6 are considered development/debugging log levels that output information normally not required in productive deployments. The recommended log level for productive deployments is 4.

See example/env of the distribution for sample configurations.

Client configuration

The following configuration files in /opt/DOMAIN/etc are used by clients:

  • db.env database to use
  • mta.env mail transport agent to use
  • soap.env definition where to find SOAP servers