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.
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
/etc/rc.d/init.d/elogd start
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:
http://localhost:8080
To start the daemon automatically, enter:
chkconfig --add elogd
chkconfig --level 345 elogd on
which will start the daemon on run levels 3,4 and 5 after the next reboot.
Note that the RPM installation creates a user and group elog
, under
which the daemon runs.
To start the daemon on non-RedHat systems, like SuSE or Solaris, a more generic startup scrips has been provided by Steve Jones in the Contributions section.
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 :
elogd -p 8080
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 under root, or the "sticky bit" is set on
the executable.
When elogd
is started under root, it attaches to the specified port
and tries to fall-back to a non-root account. This is necessary to avoid security problems.
It looks in the configuration file for the statements Usr
and
Grp.
. If found, elogd
uses that user and goupe
name to run under. The names must of course be present on the system (usually
/etc/passwd
and /etc/group
). If the statements
Usr
and Grp.
are not present, elogd
tries user and group elog
, then the default user and group (normally
nogroup
and nobody
). Care has to be taken
that elogd
, when running under the specific user and group account,
has read and write access to the configuration file and logbook directories. Note that the
RPM installation automatically creates a user and group elog
.
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 :
elogd -p 8080 -c /usr/local/elog/elogd.cfg -D
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 :
http://your.host:8080/
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 :
http://your.host/<logbook>
where <logbook>
is the name of the logbook.
The contents of the all-important configuration file elogd.cfg
are
described below.
Martin Huber reports that under Solaris 7 the following command line is needed to compile elog:
gcc -L/usr/lib/ -ldl -lresolv -lm -ldl -lnsl -lsocket elogd.c -o elogd
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.
Sridhar Anandakrishnan and Recai Oktas report that under Mac OS X there is a problem with the default stack size. The command limit stacksize unlimited (for tcsh) or ulimit -s unlimited (for bash) increases the stacksize and fixes this problem. Read the according thread in the forum.
David Otto maintains the ELOG port for FreeBSD. To install ELOG on a FreeBSD system, you can simply type
cd /usr/ports/www/elog
make install clean
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:
Redirect permanent /elog http://your.host.domain/elog/ ProxyPass /elog/ http://your.host.domain:8080/
Make sure that the Apache modules mod_proxy.c and mod_alias.c are activated. Justin Dieters <enderak@yahoo.com>
reports that mod_proxy_http.c is also required. 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
staring with /elog
to the elogd daemon.
Note: Do not put "ProxyRequests On"
into your configuration file. This option is not necessary
and can be misused for spamming and proxy forwarding of otherwise blocked sites.
Because elogd
uses links to itself (for example in the email notification and
the redirection after a submit), it has to know under which URL it is running. If you run it
under a proxy, you have to add the line:
URL = http://your.proxy.host/subdir/
into elogd.cfg.
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???).
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. Alternatively, the elogd.exe
daemon can
be registered as a service under Windows NT/2000/XP, so it gets started automatically when windows boots.
This can be selected during installation or be done manually with the start menu shortcuts.
While the pre-2.5.3 methods of installing elogd.exe as a daemon (namely FireDaemon and srvany.exe) are still possible, they are not recommended any more.
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 can
be started under the standard Web port 80. This is achieved by changing the port=8080
option in elogd.cfg
to port=80
and restarting elogd.
The ELOG daemon 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
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. Instead of restarting the server, under Unix one can send a HUP signal
like
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,
The meaning of the directory flags
Although the elogd
can be executed with the following options :
elogd [-p port] [-h hostname/IP] [-C] [-m] [-M] [-D] [-c file] [-s dir] [-d dir] [-v] [-k] [-f file] [-x]
-p <port>
TCP port number to use for the http server (if other than 80)
-h <hostname or IP address>
in the case of a "multihomed" server, host name or IP
address of the interface ELOG should run on
-C <url>
clone remote elogd configuration
-m
synchronize logbook(s) with remote server
-M
synchronize with removing deleted entries
-l <logbook>
optionally specify logbook for -m and -M commands-D
become a daemon (Unix only)
-c <file>
specify the configuration file (full path mandatory if -D is used)
-s <dir>
specify resource directory (themes, icons, ...)
-d <dir>
specify logbook root directory
-v
verbose output for debugging
-k
do not use TCP keep-alive
-f <file>
specify PID file where elogd process ID is written when server is started
-x
enables execution of shell commandselogd [-r pwd] [-w pwd] [-a pwd] [-l logbook]
-r <pwd>
create/overwrite read password in config file
-w <pwd>
create/overwrite write password in config file
-a <pwd>
create/overwrite administrative password in config file
-l <logbook>
specify logbook for -r and -w commandselogd.cfg
file in the ELOG installation directory.
"killall -HUP elogd"
to tell the server to re-read its configuration.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. -s
and -d
is explained
in the section covering the configuration options Resource dir
and
Logbook dir
in the elogd.cfg description.
elogd
program does not support secure
connections over SSL directly, it is still possible to access elogd
securely using one of the following methods. It is recommented to run elog
through an HTTPS proxy to avoid exposing elog passwords to clear text sniffing
attacks.
Using Apache:
The Apache web server can be used as a proxy
server allowing secure connections. To do so, Apache has to be configured
accordingly and a certificate has to be generated. See some
instructions
on how to create a certificate, and see Running elogd under Apache
before on this page on how to run elogd under Apache. Once configured
correctly, elogd can be accessed via http://your.host and via
https://your.host simultaneously.
The redirection statement has to be changed to
Redirect permanent /elog https://your.host.domain/elog/ ProxyPass /elog/ http://your.host.domain:8080/and following has to be added to the section "VirtualHOst ...:443 in /etc/httpd/conf.d/ssl.conf:
# Proxy setup for Elog <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /elog/ http://host.where.elogd.is.running:8080/ ProxyPassReverse /elog/ http://host.where.elogd.is.running:8080/Then, following URL statement has to be written to elogd.cfg:
URL = https://your.host.domain/elogThere is a more detailed step-by-step instructions at the contributions section.
elogd
can be accessed through a a SSH tunnel.
To do so, open an SSH tunnel like:
ssh -L 1234:your.server.name:8080 your.server.name
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.
To use elogd
togethwer with
stunnel, following steps are necessary:
elogd
. If another Web server is running
on port 80, use a different port.
stunnel
program if not already done
and start it with:
stunnel -d 443 -r your.host.name:80Substitute 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.
elogd
runs into elogd.cfg:
URL = https://your.host.name/Note the
https
at the beginning of the URL, which is
mandatory. Once you use the https
URL, elog won't work
correctly when accessed not through stunnel via
http://..
, since any redirection would always bring you
back to https://...).
https://your.host.name/
stunnel -f -d 443 -r your.host.name:80This reveals any potential error.
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 YYMMDDa.log
(where YY is the year, MM the month and DD the day). For ELOG versions 1.x.x,
the format was YYMMDD.log
. Messages are separated internally
by the string $@MID@$
. If this string is entered in a message
(main body text or attribute), it gets converted automatically in order not
to invalidate the database structure.
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??a.log
and 0103??_*
.