ELOG Administrator's Guide  

How to set up and run your very own ELOG server

  Installing and running on UNIX  

ELOG is being developed and tested under Linux, and is being used on (Sparc) Solaris workstations. It should also compile and run on other UNIX flavours.


Installation from the RPM file:

Since version 2.0, ELOG contains a RPM file which eases the installation. Get the file elog-x.x.x-x.i386.rpm from the
download section and execute as root "rpm -i elog-x.x.x-x.i386.rpm". This will install the elogd daemon in /usr/local/sbin and the elog and elconv programs in /usr/local/bin. The sample configuration file elogd.cfg together with the sample logbook will be installed under /usr/local/elog and the documentation goes to /usr/share/doc. The elogd startup script will be installed at /etc/rc.d/init.d/elogd. To start the daemon, enter It will listen under the port specified in /usr/local/elog/elogd.cfg which is 8080 by default. So one can connect using any browser with the URL: To start the daemon automatically, enter:
which will start the daemon on run levels 3,4 and 5 after the next reboot.


Installation from the tarball:

Download the latest elog-x.x.x.tar.gz package.

Expand the compressed TAR file with tar -xzvf elog-x.x.x.tar.gz. This creates a subdirectory elog-x.x.x where x.x.x is the version number. In that directory execute make, which creates the executables elogd, elog and elconv. These executables can then be copied to a convenient place like /usr/local/bin or ~/bin. Alternatively, a "make install" will copy the daemon elogd to SDESTDIR (by default /usr/local/sbin) and the other files to DESTDIR (by default /usr/local/bin). These directories can be changed in the Makefile. The elogd executable can be started manually for testing with :

where the -p flag specifies the port. Without the -p flag, the server uses the standard WWW port 80. Note that ports below 1024 can only be used if elogd is started a root, or the "sticky bit" is set on the executable.

If the program complains with something like "cannot bind to port...", it could be that the network is not started on the Linux box. This can be checked with the /sbin/ifconfig program, which must show that eth0 is up and running.

The distribution contains a sample configuration file elogd.cfg and a demo logbook in the demo subdirectory. If the elogd server is started in the elogd-x.x.x directory, the demo logbook can be directly accessed with a browser by specifying the URL http://localhost:8080 (or whatever port you started the elog daemon on). If the elogd server is started in some other directory, you must specify the full path of the elogd file with the "-c" flag and change the Data dir = option in the configuration file to a full path like /usr/local/elog.

Once testing is complete, elogd will typically be started with the -D flag to run as a daemon in the background, like this :

Note that it is mandatory to specify the full path for the elogd file when started as a daemon.

To test the daemon, connect to your host via :

If port 80 is used, the port can be omitted in the URL. If several logbooks are defined on a host, they can be specified in the URL :

where <logbook> is the name of the logbook.

The contents of the all-important configuration file elogd.cfg are described below.

  Running elogd under Apache  

For cases where elogd should run under port 80 in parallel to an Apache server, Apache can be configured to run Elog in a subdirectory of Apache. Start elogd normally under port 8080 (or similarly) as noted above and make sure it's working there. Then put following redirection into the Apache configuration file:

Make sure that the Apache modules mod_proxy.c and mod_alias.c are activated. The Redirect statement is necessary to automatically append a "/" to a request like http://your.host.domain/elog. Apache then works as a proxy and forwards all requests starint with /elog to the elogd daemon.

Note that the variable $remote_host cannot be used inside elogd since the remote host is always the proxy host (anybody knows how to fix that???).


Notes for the Solaris platform:

Martin Huber reports that under Solaris 7 the following command line is needed to compile elog:

With some combinations of Solaris servers and client-side browsers there have also been problems with ELOG's keep-alive feature. In such a case you need to add the "-k" flag to the elogd command line to turn keep-alives off.


  Installing and running in Windows  

ELOG is distributed in binary (executable) form for Windows platforms. It will run happily in console mode (or "DOS box") under Windows 9x and ME. Under Windows NT and 2000 it is also possible to run it as a service (the Windows equivalent of a UNIX daemon).

Download the latest elogxxx.exe file and execute it. The installer puts the ELOG system into a directory you specify and adds some menu shortcuts. With these shortcuts, the daemon elogd.exe can be started directly and the demo logbook can be accessed with the browser. Under Windows, the ports below 1024 can be used without restriction. So if no web server is running on the same PC the ELOG daemon listens under the standard Web port 80.

The "-D" (daemon) command line option only works under UNIX. To start elogd as a service under Windows NT/2000, you can do one of the following :


  Server Configuration  

The ELOG daemon elogd can be executed with the following options :

with :

It may also be used to generate passwords :

with :

The appearance, functionality and behaviour of the various logbooks on an ELOG server are determined by the single elogd.cfg file in the ELOG installation directory.

This file may be edited directly from the file system, or from a form in the ELOG Web interface (when the Config menu item is available). In this case, changes are applied dynamically without having to restart the server.

The many options of this unique but very important file are documented on the separate elogd.cfg syntax page.

To better control appearance and layout of the logbooks, elogd.cfg may optionally specify the use of additional files containing HTML code, and/or custom "themes" configurations. These need to be edited directly from the file system right now.

The meaning of the directory flags -s and -d is explained in the section covering the configuration options Resource dir and Logbook dir in the elogd.cfg description.


  Secure Connections HOWTO  

Although the elogd program does not support secure connections over SSL directly, it is possible to use it together with stunnel to do so. Three steps are necessary:

  1. Start elogd. If another Web server is running on port 80, use a different port.

  2. Install the stunnel program if not already done and start it with:

    stunnel -d 443 -r your.host.name:80
    Substitute the port 80 if you started elogd on another port. This causes stunnel to receive requests on the https port 443 and forward them to the elogd port.

  3. Connect to your logbook with a browser which supports SSL via:

    https://your.host.name/

Alternatively, elogd can be accessed through a SSH tunnel. To do so, open an SSH tunnel like:

This opens a secure tunnel from your local host, port 1234, to the server host where the elogd daemon is running on port 8080. Now you can access http://localhost:1234 from your browser and reach elogd in a secure way.


  How It All Works  

For the technically curious :

The concept of ELOG is very simple. The logbook functionality is implemented by a single daemon program, elogd, which is written in C. It contains an integrated Web server, which does not serve files like standard Web servers, but reads logbook entries from its database and formats them into HTML. Since only forms and tables are used, no Java or Javascript is necessary, which makes the logbook display very fast. The system does not use any images on purpose to reduce the amount of data to be transferred. Since the ELOG daemon contains its own http server, no additional server like Apache is required.

The "database" in which ELOG saves its entries is in plain ASCII format. One file is created for each day in the form YYMMDD.log (where YY is the year, MM the month and DD the day). The only non-ASCII character is a form-feed at the end of each message. If a log file is sent directly to a printer, each message is therefore printed on a separate page. Note that the log files should not be edited manually, since this could invalidate the internal database structure (each header contains the message length in bytes, which would then become incorrect).

If attachments are submitted, they are saved as separate files named YYMMDD_HHMMSS_name - where in addition to the date the time is specified and name is the original file name of the attachment. To copy the database to another computer, only the *.log files and the attachment files need to be copied. To copy for example all files from March 2001, just select them with 0103??.log and 0103??_*.