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.

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 and elog . These executables can then be copied to a convenient place like /usr/local/bin or ~/bin. 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 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/elogdata.

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.

To start the daemon automatically, it can be run from the /etc/rc.d/init.d system. Please consult your distribution to find out how to do that.
Under RedHat 6.x. I use a script which I put under /etc/rc.d/init.d. Then I call :


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.


  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??_*.