ID |
Date |
Author |
Author Email |
Category |
Subject |
Status |
Last Revision |
49
|
Wed May 11 09:35:23 2016 |
Hanno Perrey | hanno.perrey@nuclear.lu.se | Script | Re: Re: Custom input forms implementation | Stable | Wed May 11 09:43:34 2016 by Hanno Perrey |
Stefan Ritt wrote: |
Dear ELOG users,
starting with SVN revision 2328, custom input forms are implemented. This allows application specific formats for check lists etc. In our specific case we had to implement a shift check list, which was quite long. Furthermore the check list should be optimized for an iPad, which we take in the field and record various checks and readings (in our case some gas pressure gauges at the PSI particle accelerator). Since the standard ELOG interface was too inflexible, a completely hand-written form was needed. The form can be activated by the new configuration options Custom New Form, Custom Edit Form and Custom Display Form, one for a new entry, an entry to edit and and entry to display. In our case we used the same form for all three cases. This is how the shift check list looks under the Safari Browser on a PC:

And here is how it looks on the iPad:

Each section can be collapsed and expanded (blue arrows at the left), and various internal checks are made before the check list can be submitted.
Implementing such forms is however more something for the advanced user, since you have to hand-write HTML with CSS and JavaScript code. It can then however be a powerful method for check lists. Please find in the attachments the elogd.cfg configuration for that logbook and the shiftcheck.html source code file. It is a bit complicated since the page is a static page, elogd just serves it from the file. This requires all the dynamic functions to be implemented inside the HTML file with JavaScript. To display an entry for example, the JavaScript loads the raw data with the "?cmd=Download" command and the populates the form fields. The collapsing and expanding is done by using CSS properties. The integrated style sheet was optimized for the rendering on an iPad. Rather large fonts were chosen so that the items can be checked easily with your finger tips. Various parameters are sent between the browser and the elogd program via hidden fields and cookies. So only something for experts! But if you go through the effort and hand-write the form, it can be very handy. Note that you have to upgrade to SVN revision 2328 for the three new options.
|
Thank you very much for this nice example!
I found a little issue with newer ELOG versions: if the authentication is done via session cookies, the submission of the checklist will fail with the error "Cannot open file passwd". This is actually misleading as the cause of the error is the empty user name submitted (since the cookie storing user name and pwd hash is never created) and not the password file itself. This can be worked around by removing the user name and pwd fields in the html form before submitting in case there is a SID cookie around.
The attached shiftcheck.html contains this workaround and seems to be functioning fine on my installation (ELOG 3.1.0).
Cheers,
Hanno |
152
|
Wed Mar 4 18:40:57 2020 |
Laurent Jean-Rigaud | lollspam@free.fr | Other | Re: Re: RPM build process enhancements | Stable | Wed Mar 4 18:45:05 2020 by Laurent Jean-Rigaud |
Sorry, the patch is malformed for the template file. Check PJ.
Bye,
Laurent
Laurent Jean-Rigaud wrote: |
Hi Stefan,
2nd patch for RPM build which adds :
- dynamic build options for krb5/ldap/pam/ssl support :
- for git / non rpm users :
- buildrpm version release [-krb5] [-ldap] [-pam] [-ssl]
- for rpm users using SRPMS (dependances are managed) :
- rpm -i elog-ver-rel.src.rpm && rpmbuld -bb [--use krb5] [--use ldap] [--use pam] [--use ssl] ~/rpmbuild/SPECS/elog.spec
- dynamic 2 last changelog entries :
- last with build information with
- dynamic user 's info (use your info if builded from PSI, or use %packager from ~/.rpmmacros if exists, or set to username username@ostname)
- build options list (KBR5, LDAP, PAM, SSL)
- before last for product changelog of current ELOG version-release
- customrel flag for local rebuild :
- release = %elogrel%{?customrel}%{?dist)
- so custom builder can add --define 'customrel NSA' at rpmbuild command or in .rpmmacros file -> elog-3.1.4-2.NSA.el7.x86_64.rpm by example.
- elog version and release are delivered in specfile as default for rebuild (tarball name uses it so it can not be changed for local rebuild from SRPMS).
- buildrpm uses ~/rpmbuild/SPECS/elog.spec generated from elog.spec.template (elog.spec is deleted in repo, replaced by elog.spec.template).
Tested on EL6 and EL7 x86_64 :-)
Bye
Laurent Jean-Rigaud wrote: |
Hi Stefan,
I enclosed a patch for RPM build process available on GIT.
changes :
- rpmbuild :
- checks if provider or custom build (the rm/mv are done on your computers only :-))
- call rpmbuild with version / release given as parameters
- elog.spec :
- last changelog entry date is set to build date
- build with debug for debuginfo rpms (product rpms are normally automatically strimmed)
- elog.init call /etc/ini.d/functions for RHEL/Centos/Fedora/? dists
Todo:
- add RPMbuild options for ldap/pam/...
- enclosed git log in changelog automatically (the dream :-))
|
|
|
151
|
Mon Mar 2 14:31:12 2020 |
Laurent Jean-Rigaud | lollspam@free.fr | Other | Re: RPM build process enhancements | Stable | Wed Mar 4 18:40:40 2020 by Laurent Jean-Rigaud |
Hi Stefan,
2nd patch for RPM build which adds :
- dynamic build options for krb5/ldap/pam/ssl support :
- for git / non rpm users :
- buildrpm version release [-krb5] [-ldap] [-pam] [-ssl]
- for rpm users using SRPMS (dependances are managed) :
- rpm -i elog-ver-rel.src.rpm && rpmbuld -bb [--use krb5] [--use ldap] [--use pam] [--use ssl] ~/rpmbuild/SPECS/elog.spec
- dynamic 2 last changelog entries :
- last with build information with
- dynamic user 's info (use your info if builded from PSI, or use %packager from ~/.rpmmacros if exists, or set to username username@ostname)
- build options list (KBR5, LDAP, PAM, SSL)
- before last for product changelog of current ELOG version-release
- customrel flag for local rebuild :
- release = %elogrel%{?customrel}%{?dist)
- so custom builder can add --define 'customrel NSA' at rpmbuild command or in .rpmmacros file -> elog-3.1.4-2.NSA.el7.x86_64.rpm by example.
- elog version and release are delivered in specfile as default for rebuild (tarball name uses it so it can not be changed for local rebuild from SRPMS).
- buildrpm uses ~/rpmbuild/SPECS/elog.spec generated from elog.spec.template (elog.spec is deleted in repo, replaced by elog.spec.template).
Tested on EL6 and EL7 x86_64 :-)
Bye
Laurent Jean-Rigaud wrote: |
Hi Stefan,
I enclosed a patch for RPM build process available on GIT.
changes :
- rpmbuild :
- checks if provider or custom build (the rm/mv are done on your computers only :-))
- call rpmbuild with version / release given as parameters
- elog.spec :
- last changelog entry date is set to build date
- build with debug for debuginfo rpms (product rpms are normally automatically strimmed)
- elog.init call /etc/ini.d/functions for RHEL/Centos/Fedora/? dists
Todo:
- add RPMbuild options for ldap/pam/...
- enclosed git log in changelog automatically (the dream :-))
|
|
9
|
Wed Jul 7 18:19:10 2004 |
Steve Jones | steve.jones@freescale.com | Script | Generic Unix elogd init script | Stable | Wed Jul 7 18:19:38 2004 by Steve Jones |
The elogd.init script that ships in the elog distribution is Linux centric.
This script is written to work in a generic Unix environment under 'sh' -
no frills! |
27
|
Tue Jan 29 23:18:39 2008 |
Diogo Alves | diogomiguelalves@gmail.com | Script | Multiple file upload for Firefox | Stable | Wed Jan 30 07:56:53 2008 by Stefan Ritt |
Here's a firefox extension that works extremely well if one uses drag n'drop to upload several attachment files at once:
https://addons.mozilla.org/en-US/firefox/addon/219
|
47
|
Sun Aug 23 21:27:00 2015 |
Daniel Sajdyk | daniel.sajdyk@gmail.com | Theme/Skin | Simple theme | Beta | Tue Sep 1 07:39:45 2015 by Daniel Sajdyk |
Hello.
I did simple theme for ELOG called "dansaj".
This is verision which I did for my ELOG, and if you have troubles in other configurations, please let me know, and we will correct it.
Vectors versions of icons you can find in oryginals folder (if you want to transform it).
The most current version you can download from my blog - Elog theme, czyli skórka, albo temat.
Regards
Daniel. |
17
|
Mon Oct 10 18:47:09 2005 |
Exaos Lee | Exaos.Lee@gmail.com | Script | How to run elogd on Gentoo Linux | Stable | Tue Oct 11 08:06:55 2005 by Stefan Ritt |
I have created some scripts for running elogd on Gentoo Linux. Please untar the attachment and read the file "elogd_gentoo_readme". Any comment is welcomed. |
35
|
Tue May 24 22:43:38 2011 |
JacekK | doctor99@poczta.onet.pl | Script | Javascript verification of simple attributes with regexp | Beta | Tue May 24 22:46:38 2011 by JacekK |
Hi,
I added possibility for a new verification of required fields in generated Javascript "function chkform() ". To do this I added new logbook option "ValidPattern", in which you can set regular expression for an attribute, for example
ValidPattern HexDigits=[0-9a-fA-F]+
If there is a pattern set for required field, then in chkform() function is generated additional verification, if value of the field matches validation regexp.
Changes I made should not decrease performance of elogd. Let me know please if you can add it to regular version.
Jacek |
44
|
Tue Jul 8 15:43:21 2014 |
TimS | timpie_s@yahoo.com | Script | Re: Custom input forms implementation | Stable | Tue Mar 19 13:18:33 2013 by Stefan Ritt |
Stefan Ritt wrote: |
Dear ELOG users,
starting with SVN revision 2328, custom input forms are implemented. This allows application specific formats for check lists etc. In our specific case we had to implement a shift check list, which was quite long. Furthermore the check list should be optimized for an iPad, which we take in the field and record various checks and readings (in our case some gas pressure gauges at the PSI particle accelerator). Since the standard ELOG interface was too inflexible, a completely hand-written form was needed. The form can be activated by the new configuration options Custom New Form, Custom Edit Form and Custom Display Form, one for a new entry, an entry to edit and and entry to display. In our case we used the same form for all three cases. This is how the shift check list looks under the Safari Browser on a PC:
And here is how it looks on the iPad:

Each section can be collapsed and expanded (blue arrows at the left), and various internal checks are made before the check list can be submitted.
Implementing such forms is however more something for the advanced user, since you have to hand-write HTML with CSS and JavaScript code. It can then however be a powerful method for check lists. Please find in the attachments the elogd.cfg configuration for that logbook and the shiftcheck.html source code file. It is a bit complicated since the page is a static page, elogd just serves it from the file. This requires all the dynamic functions to be implemented inside the HTML file with JavaScript. To display an entry for example, the JavaScript loads the raw data with the "?cmd=Download" command and the populates the form fields. The collapsing and expanding is done by using CSS properties. The integrated style sheet was optimized for the rendering on an iPad. Rather large fonts were chosen so that the items can be checked easily with your finger tips. Various parameters are sent between the browser and the elogd program via hidden fields and cookies. So only something for experts! But if you go through the effort and hand-write the form, it can be very handy. Note that you have to upgrade to SVN revision 2328 for the three new options.
|
That's awesome!! Didn't know ELOG was still being developed!! I was looking for this ...been trying this version now with
supplied example but there's files missing which are being referenced from the html file.
Anyway it would be nice to know a little more on how to use this and how it incorporates into ELOG.
Is some more work being done on this version ?
Thankx heaps for this great enhancement although now it's still needs a lot of figuring out on how to do this.
|
50
|
Tue Jul 26 10:16:22 2016 |
Andreas Luedeke | simon.ebner@psi.ch | Script | Python module to read/write/edit/reply/delete ELOG entries | Stable | Tue Jul 26 10:26:34 2016 by Andreas Luedeke |
Hello Everybody!
I would just like to inform you that there is a new Python module available to access and work with ELOG (read/write/edit/reply/delete).
Currently the module is only supported for Python version 3. The package is pure Python and has no special dependencies. Therefore you can use the package on any machine.
The documentation you can find on https://github.com/paulscherrerinstitute/py_elog
If you want to install the package in an Anaconda on your local machine just use
conda install -c paulscherrerinstitute elog
(also works from outside PSI - the package is available at https://anaconda.org/paulscherrerinstitute/elog)
If there are issues with the package please use the issue tracker that comes with the github repository
https://github.com/paulscherrerinstitute/py_elog/issues or let me know.
Best
Simon |
14
|
Fri Jul 8 17:34:02 2005 |
Emiliano Gabrielli | AlberT@SuperAlberT.it | Script | JavaScript list auto-refresh | Stable | Tue Jul 12 12:36:16 2005 by Emiliano Gabrielli |
Here is a simple piece of JS code to accomplish a smart page reload.
We don't reload if in some kind of editing mode.
You can put the code everywhere you like in the elog html page, my suggestion is to put it in Bottom Text (or Top Text):
;auto-refresh
Bottom text = [I]<script language="JavaScript">if (null==window.location.href.match('/[0-9]+$|.*(cmd|select)=.*') ) { window.setTimeout("location.reload();", 2*60*1000); now=new Date(); document.write('<br/>Last reload at '+now.getFullYear()+'/'+(now.getMonth()+1)+'/'+now.getDate()+', '+( ((h=now.getHours())<10) ? '0'+h :h)+':'+( ((m=now.getMinutes())<10) ? '0'+m :m)+':'+( ((s=now.getSeconds())<10) ? '0'+s :s)) }</script>[/I]
the timer is a product of # of minutes, #of seconds and milliseconds... 2 minutes in the above example 
Revision Tue Jul 12 12:36:16 2005 wrote: |
modified regular expression in order to not activate the auto-refresh in the signle entry view
|
|
36
|
Tue Aug 23 12:07:51 2011 |
Stefan Ritt | stefan.ritt@psi.ch | Script | Re: JavaScript list auto-refresh | Stable | Tue Jul 12 12:36:16 2005 by Emiliano Gabrielli |
Emiliano Gabrielli wrote: | Here is a simple piece of JS code to accomplish a smart page reload.
We don't reload if in some kind of editing mode.
You can put the code everywhere you like in the elog html page, my suggestion is to put it in Bottom Text (or Top Text):
;auto-refresh
Bottom text = [I]<script language="JavaScript">if (null==window.location.href.match('/[0-9]+$|.*(cmd|select)=.*') ) { window.setTimeout("location.reload();", 2*60*1000); now=new Date(); document.write('<br/>Last reload at '+now.getFullYear()+'/'+(now.getMonth()+1)+'/'+now.getDate()+', '+( ((h=now.getHours())<10) ? '0'+h :h)+':'+( ((m=now.getMinutes())<10) ? '0'+m :m)+':'+( ((s=now.getSeconds())<10) ? '0'+s :s)) }</script>[/I]
the timer is a product of # of minutes, #of seconds and milliseconds... 2 minutes in the above example 
Revision Tue Jul 12 12:36:16 2005 wrote: |
modified regular expression in order to not activate the auto-refresh in the signle entry view
|
|
Starting with SVN revision 2422, there is a new config option
refresh = <seconds>
which lets you do the same thing. |
153
|
Tue Dec 7 01:38:23 2021 |
Anthony J Krishock | ajkrishock@gmail.com | Theme/Skin | Astronomical logbook using Elog | Stable | Tue Dec 7 01:44:25 2021 by Anthony J Krishock |
Hello all,
I became aware of the usefulness of Elog while working at Brookhaven National Lab. Since that time, I have developed a version of Elog that can be used as a log book for observations in Astronomy (my longtime hobby). Attached is my default.css theme and replacement icon files that match the theme. The color scheme is chosen to minimize bright lights and preserve night vision
To install, just place the default.css file in the default theme directory and copy over the icon files into the default theme directory and replace the default ones.
Comments and suggestions welcome!
Thank you |
154
|
Thu Mar 3 12:01:55 2022 |
rami khrais | rami.khrais@sesame.org.jo | Other | Fixing repeating first inline_image in email | Stable | Thu Mar 10 11:30:20 2022 by rami khrais |
Fixing repeating first image in email (email notification) when the user submit a new log with in_line images. |
22
|
Wed Jul 11 11:13:16 2007 |
Peter Rienstra | peter.rienstra@gmail.com | Other | Compiling elogd.c on HP-UX 64 bit | Beta | Thu Jul 12 09:38:47 2007 by Peter Rienstra |
We succeeded in compiling and running elogd (elog-2.6.5) on HP-UX 64 bit Itanium platform (HP-UX B.11.23 U ia64).
The main problem was we got a core dump after starting elogd. The cause was that the memory has be allocated with a 4 byte boundary. This could be the case on other 64 bit platforms as well. A colleague of mine (Sander Notting) found the solution.
Unzip and untar the zip file (elog-latest.tar.gz)
Go to the src directory (elog-2.6.5/src)
Edit elogd.c
Replace all:
show_selection_page(NULL); => show_selection_page();
seteuid => setuid
setegid => setgid
On line 564:
void *buffer => char *buffer
Line 645, add the text in bold:
void *xmalloc(size_t bytes)
{
char *temp;
/* Align buffer on 4 byte boundery for HP UX and other 64 bit systems to prevent Bus error(core dump)*/
if (bytes & 3)
bytes += 4 - (bytes & 3);
temp = (char *) malloc(bytes + 12);
After that compile:
cc -w -c -o regex.o regex.c
cc -w -c -o mxml.o ../../mxml/mxml.c
cc -w -c -o strlcpy.o ../../mxml/strlcpy.c
cc -I../../mxml -o elogd elogd.c regex.o mxml.o strlcpy.o
We didn't try to run elogd under root yet. |
23
|
Fri Jul 13 12:36:45 2007 |
Stefan Ritt | stefan.ritt@psi.ch | Other | Re: Compiling elogd.c on HP-UX 64 bit | Beta | Thu Jul 12 09:38:47 2007 by Peter Rienstra |
I applied most of your patches to the elog source code, SVN revision 1885. The only missing piece has to do with seteuid/setuid. I definitively need seteuid for linux, because elogd might be started under root, then it falls back to an optional elog user. But when it stops, it has to restore the original root user in order to delete the PID file (/var/run/elogd.pid) which was created under root. If seteuid does not exist under HP-UX, you should add something like
#ifdef HP-UX
setuid(...)
#else
seteuid(...)
#endif
Probably the HP-UX has to be something else, but I cannot test this since I don't have such an OS here. Once you get this working I can put it into the standard distribution. |
24
|
Mon Jul 16 15:27:08 2007 |
Peter Rienstra | peter.rienstra@gmail.com | Other | Re: Compiling elogd.c on HP-UX 64 bit | Beta | Thu Jul 12 09:38:47 2007 by Peter Rienstra |
Stefan,
First I want to say I really like your program. We work in a small group of 5 database administrators, and this is exactly what we need to inform each other. Elog is simple but very functional, so thanks!
My problem is that I don't have root access to the HP-UX machines. We don't run elogd as root, so I wasn't really interested in the seteuid functionality, I just wanted to compile and run the program.
HP-UX doesn't have the "seteuid" and "setegid" functions. But there are "setuid+setgid", "setreuid+setregid" and "setresuid+setresgid" functions available. I'm not sure which one is the best to use. I uploaded the manpages as attachment. I hope this will help you.
If you want I can do a compile and run test on HP-UX with your altered source code. But I can't do a test with "root".
Stefan Ritt wrote: | I applied most of your patches to the elog source code, SVN revision 1885. The only missing piece has to do with seteuid/setuid. I definitively need seteuid for linux, because elogd might be started under root, then it falls back to an optional elog user. But when it stops, it has to restore the original root user in order to delete the PID file (/var/run/elogd.pid) which was created under root. If seteuid does not exist under HP-UX, you should add something like
#ifdef HP-UX
setuid(...)
#else
seteuid(...)
#endif
Probably the HP-UX has to be something else, but I cannot test this since I don't have such an OS here. Once you get this working I can put it into the standard distribution. |
|
25
|
Mon Jul 16 15:57:47 2007 |
Stefan Ritt | stefan.ritt@psi.ch | Other | Re: Compiling elogd.c on HP-UX 64 bit | Beta | Thu Jul 12 09:38:47 2007 by Peter Rienstra |
Peter Rienstra wrote: | HP-UX doesn't have the "seteuid" and "setegid" functions. But there are "setuid+setgid", "setreuid+setregid" and "setresuid+setresgid" functions available. |
I had a look and found that setreuid/setregid is also available under Linux, so I use those functions instead, which should also work on HP-UX. Can you check revision 1888 (http://savannah.psi.ch/viewcvs/trunk/src/elogd.c?root=elog&rev=1888), compile it and see if you can run it at least under your non-root account. |
26
|
Mon Jul 16 16:43:07 2007 |
Peter Rienstra | peter.rienstra@gmail.com | Other | Re: Compiling elogd.c on HP-UX 64 bit | Beta | Thu Jul 12 09:38:47 2007 by Peter Rienstra |
I downloaded revision 1888. There were no problems compiling it. It's running on the HP-UX system now and everything seems to work fine.  |
39
|
Fri Sep 17 06:19:39 2010 |
Stefan Ritt | stefan.ritt@psi.ch | Script | Custom input forms implementation | Stable | Thu Jul 2 20:55:55 2015 by Stefan Ritt |
Dear ELOG users,
starting with SVN revision 2328, custom input forms are implemented. This allows application specific formats for check lists etc. In our specific case we had to implement a shift check list, which was quite long. Furthermore the check list should be optimized for an iPad, which we take in the field and record various checks and readings (in our case some gas pressure gauges at the PSI particle accelerator). Since the standard ELOG interface was too inflexible, a completely hand-written form was needed. The form can be activated by the new configuration options Custom New Form, Custom Edit Form and Custom Display Form, one for a new entry, an entry to edit and and entry to display. In our case we used the same form for all three cases. This is how the shift check list looks under the Safari Browser on a PC:

And here is how it looks on the iPad:

Each section can be collapsed and expanded (blue arrows at the left), and various internal checks are made before the check list can be submitted.
Implementing such forms is however more something for the advanced user, since you have to hand-write HTML with CSS and JavaScript code. It can then however be a powerful method for check lists. Please find in the attachments the elogd.cfg configuration for that logbook and the shiftcheck.html source code file. It is a bit complicated since the page is a static page, elogd just serves it from the file. This requires all the dynamic functions to be implemented inside the HTML file with JavaScript. To display an entry for example, the JavaScript loads the raw data with the "?cmd=Download" command and the populates the form fields. The collapsing and expanding is done by using CSS properties. The integrated style sheet was optimized for the rendering on an iPad. Rather large fonts were chosen so that the items can be checked easily with your finger tips. Various parameters are sent between the browser and the elogd program via hidden fields and cookies. So only something for experts! But if you go through the effort and hand-write the form, it can be very handy. Note that you have to upgrade to SVN revision 2328 for the three new options.
|
15
|
Thu Jul 28 18:42:48 2005 |
Emiliano Gabrielli | AlberT@SuperAlberT.it | Other | [New Feature]: JS calendar filter | Beta | Thu Aug 4 11:20:36 2005 by Emiliano Gabrielli |
NOTE:
it seems that for some strange reason it slows down elog very much when and only when elog is stunneled over ssl!
The attached tarball contains a full featured JavaScript allowing everyone to use a JS calendar (no popup windows, just JS and CSS!) to perform date-based filtering actions. An uncompressed version and the tarball for the last cvs rvision of this script is available at www.SuperAlberT.it
You can browse the ChangeLog here.
A simple way to use it is to uncompress the wall package into the elog data dir, under the "scripts" subdir.
the you can add the following code to your elog.cfg:
Filter Menu text = scripts/calendar_filter/calendar_filter.html
note that this configuration parameter is available in elog starting from
Revision 1.732 2005/07/29
and automagically have the new calendar_filter icon showed 
 |
6
|
Wed Sep 17 11:43:44 2003 |
R. Beekman | rbeekman@hiscom.nl | | ELOG v2.3.9 CSS cross-reference (used for skins) | Beta | September 17, 2003 by R. Beekman |
For all you guys (and girls;-) who want to add skins to ELOG, it is
important to know what will be affected if you change a style.
So I made a cross reference of styles vs. html pages.
In the attached ZIP file you will find:
--> "ELOG CSS xref.xls" (Microsoft Excel spreadsheet)
--> "ELOG CSS xref.pdf" (PDF file for those who do not have Excel)
--> A directory containing the html pages I documented and the ELOG
stylesheet (.css-file) that you need when you want to see the html files.
Images are not included: they are not needed for this purpose.
I know that not all pages are documented, but Stefan told me that there is
no complete list of all pages because they are generated. So I documented
only the pages I need at this moment.
Please feel free to mail me when you have comments, corrections or
additions. |
53
|
Sat Sep 16 15:47:16 2017 |
David Pilgram | David.Pilgram@epost.org.uk | Script | Re: Check logbook files for wrong references | Stable | Sat Sep 16 15:52:58 2017 by David Pilgram |
I had to modify the script because I'm still on elog 2.9.2, where there are not subdirectories (by year) for
each logbook. Line 5 had to be changed to
$logf=q/[0-9][0-9][01][0-9][0-3][0-9]a.log/;
to do this.
Once done, I found the deliberate orphan script that I had put in to test, and rather too many other orphans than I had expected. One or two I cannot explain. If I had clicked on any of those entries elog would have gone into infinate loop.
A very useful utility. Thanks Andreas!
Andreas Luedeke wrote: |
You can run this little script to check if all entries referenced "In reply to:" do actually exist.
To use it, you first need to "cd" to your logbook directory ("cd /usr/local/elog/logbooks") and then run it without arguments "logcheck".
If it finds references pointing to a missing entry, it'll print the path to the file with the offending reference and some lines. For example:
### error: reference to entry 146, that exists 0 times. Reference is:
### Proscan/2012/120507a.log-<p>[...].</p>
### Proscan/2012/120507a.log-$ @ MID @ $: 147
### Proscan/2012/120507a.log-Date: Mon, 07 May 2012 13:44:03 +0200
### Proscan/2012/120507a.log:In reply to: 146
### Proscan/2012/120507a.log-Wann: 1336373261
### Proscan/2012/120507a.log-Autor: [...]
### Proscan/2012/120507a.log-Eintrag: Problem
[...]-
Very often this happens if an entry is deleted AFTER someone already replied to it. Normally that is no problem, but in some cases you might get infinite loops and that causes ELOG to hang. The script is not checking for loops, but wrong references might give you a hint where to look.
The script will print duplicate entries as well, if the referenced entry exist more than once.
Cheers, Andreas
PS: never include the string "$ @ MID @ $:" without spaces in an ELOG entry: apparently ELOG cuts off all text from that token on.
|
|
149
|
Sat Jun 15 06:13:07 2019 |
John | secondcomingtechnologies@fastmail.com | Script | Re: Custom input forms implementation | Stable | Sat Jun 15 06:19:24 2019 by John |
I have been trying to get my head around this application module. I assume that after the input is done on this example (ShiftCheck), if goes into the usual file system directorys for storage? Or is it (or can it) goto another db like sql, flat, etc.? I also assume that the 'normal' Elog screens we see for input (and output), would be a completely seperate module that you have for (ShiftCheck).. but we do not see them here (as one of the attachments)? I am asking these questions because I am trying to recreate this (type) of input/output system for users, so I would like to know how the 'whole picture' is done with your example here. Thanx again.
Stefan Ritt wrote: |
Dear ELOG users,
starting with SVN revision 2328, custom input forms are implemented. This allows application specific formats for check lists etc. In our specific case we had to implement a shift check list, which was quite long. Furthermore the check list should be optimized for an iPad, which we take in the field and record various checks and readings (in our case some gas pressure gauges at the PSI particle accelerator). Since the standard ELOG interface was too inflexible, a completely hand-written form was needed. The form can be activated by the new configuration options Custom New Form, Custom Edit Form and Custom Display Form, one for a new entry, an entry to edit and and entry to display. In our case we used the same form for all three cases. This is how the shift check list looks under the Safari Browser on a PC:

And here is how it looks on the iPad:

Each section can be collapsed and expanded (blue arrows at the left), and various internal checks are made before the check list can be submitted.
Implementing such forms is however more something for the advanced user, since you have to hand-write HTML with CSS and JavaScript code. It can then however be a powerful method for check lists. Please find in the attachments the elogd.cfg configuration for that logbook and the shiftcheck.html source code file. It is a bit complicated since the page is a static page, elogd just serves it from the file. This requires all the dynamic functions to be implemented inside the HTML file with JavaScript. To display an entry for example, the JavaScript loads the raw data with the "?cmd=Download" command and the populates the form fields. The collapsing and expanding is done by using CSS properties. The integrated style sheet was optimized for the rendering on an iPad. Rather large fonts were chosen so that the items can be checked easily with your finger tips. Various parameters are sent between the browser and the elogd program via hidden fields and cookies. So only something for experts! But if you go through the effort and hand-write the form, it can be very handy. Note that you have to upgrade to SVN revision 2328 for the three new options.
|
|
12
|
Wed Feb 23 11:25:51 2005 |
Emiliano Gabrielli | AlberT@SuperAlberT.it | Script | bash script for thumbnails creation, version: 0.2.0 | Stable | Mon May 2 14:51:29 2005 by Emiliano Gabrielli |
The following script creates a thumbnail for image/ps/pdf files.
it can be used with "Execute edit" and "Execute new" configuration commands
in order to get resized thumbs of attachments.
It uses file(1), convert(1) for images, gs(1) is also required for ps and pdf.
You have to start elogd with the "-x" option to enable execution and put
something similar to the following in you configuration elog file:
Execute new = /path/to/make_thumbs -s 650 -q 95 $attachments
Execute edit = /path/to/make_thumbs -s 100 $attachments
make_thumbs have to be executable by the user running elogd, of course.
ChangeLog:
* version 0.2.0 Fixes a BUG in PDF creation |
148
|
Mon Mar 11 09:28:15 2019 |
Maurat | gm001@free.fr | Script | Code change for LDAP authentication | Stable | Mon Mar 11 10:15:43 2019 by Maurat |
Hi,
I had to change code to authenticate users in my organization's LDAP directory. Indeed, accounts are distributed under several organizational units in my LDAP directory.
The current version of the code can't authenticate accounts when these are in different organizational units. Hence my contribution.
I Use a read account to request LDAP to locate the account that has logged in (with e-mail address in the search filter).
I get the number of LDAP entries. If I have one entry then I call ldap_get_dn function to get the DN account and then I call ldap_simple_bind_s using the account's DN and password to perform LDAP authentication.
I changed configuration file elogd.cfg. I added two parameters:
LDAP DN user = <DN read account>
LDAP PW user = <password read account>
I changed code auth.c too (see attached file)
I had to change Makefile. I added a call to lber library
ifdef USE_LDAP
ifneq ($(USE_LDAP), 0 )
CFLAGS += -DHAVE_LDAP
LIBS += -lldap -llber
endif
endif
Have good day
|
13
|
Thu Apr 28 15:45:58 2005 |
Alex H | alexsynergie-infcom | Theme/Skin | Bubble for pleasure by L'ange noir | Stable | Mon Aug 1 09:35:26 2005 by Alex H |
The original theme is from Francois Cukier but I have change a some color
and font.
Francois Cukier said : "Uncompress "Bubble.zip" in your Elog default
folder if you want to replace the original elog theme. Otherwise, if you
decompress it in another folder, you will need to modify your elogd.cfg
file as described at this adress: http://midas.psi.ch/elog/config.html"
Do it at the same ;o)
I want to thanks Francois Cukier and Stephan Ritt for their works, so
THANKS a lot !
I wait your comments :o).
-UPDATE------------------------------------------------------------------------
2005/08/1 : Alexander Sheremet correct CSS bug thanks to it, archive re-uploaded |
42
|
Mon Apr 29 04:29:33 2013 |
Ryan Blakeslee | rb@blakesys.net | Theme/Skin | Clean plain-text CSS - modified from default.css | Stable | Mon Apr 29 23:34:40 2013 by Ryan Blakeslee |
Hello,
I am using ELOG 2.5.2. I had a real need for a simplified almost text-only version of the application. For me
personally, I like simple, minimalist and text-only as much as possible for the tools I use. I personally found
the layout with all the colors to be distracting from the content of each log entry. Again this is ONLY my
personal preference, NO offense meant. :-)
I took the default.css and modified it to achieve what I needed. I am uploading here, the .css file. It uses
"blue" for some of the things such as attribute fields on single page view, etc. but overall it's all clean,
plain-text.
I don't know if this css will work on newer versions of ELOG (since I know i'm using an old one.) But it's my
hope that others like me, will find this modification very useful.
Thank you Stefan, and community -- this is an awesome tool, that I use in my business. It's amazing how simple
tools are always the most powerful and scale-able! Fantastic, excellent job on this app. |
52
|
Fri Sep 15 17:19:47 2017 |
Andreas Luedeke | andreas.luedeke@psi.ch | Script | Check logbook files for wrong references | Stable | Fri Sep 15 17:41:41 2017 by Andreas Luedeke |
You can run this little script to check if all entries referenced "In reply to:" do actually exist.
To use it, you first need to "cd" to your logbook directory ("cd /usr/local/elog/logbooks") and then run it without arguments "logcheck".
If it finds references pointing to a missing entry, it'll print the path to the file with the offending reference and some lines. For example:
### error: reference to entry 146, that exists 0 times. Reference is:
### Proscan/2012/120507a.log-<p>[...].</p>
### Proscan/2012/120507a.log-$ @ MID @ $: 147
### Proscan/2012/120507a.log-Date: Mon, 07 May 2012 13:44:03 +0200
### Proscan/2012/120507a.log:In reply to: 146
### Proscan/2012/120507a.log-Wann: 1336373261
### Proscan/2012/120507a.log-Autor: [...]
### Proscan/2012/120507a.log-Eintrag: Problem
[...]-
Very often this happens if an entry is deleted AFTER someone already replied to it. Normally that is no problem, but in some cases you might get infinite loops and that causes ELOG to hang. The script is not checking for loops, but wrong references might give you a hint where to look.
The script will print duplicate entries as well, if the referenced entry exist more than once.
Cheers, Andreas
PS: never include the string "$ @ MID @ $:" without spaces in an ELOG entry: apparently ELOG cuts off all text from that token on. |
46
|
Fri Jul 31 13:52:32 2015 |
TorstenJ | torsten.jakob@jet-services.com | Web site | Problem with Internet Explorer when saving an entry | Stable | Fri May 31 14:20:43 2019 by Stefan Ritt |
Hi all,
first off all let me say, that I realy like this great tool. That is a lot of help for keeping our server documentation up-to-date. Thanks to all contributors for that.
I right here, because I actually have an issue with saving entries working with IE11 (but also in IE9). When ever I enter an entry, and click the save button, the page open a page with the text: "OK 1" or the second attemp: "OK 2" 3rd "OK 3" and so on. To get back to my Item list, I have to click the back button in the internet explorer. I also opens a lot of draft entries in my databases. When I submit my entry, I don't have an issue, and the entry is saved correctly.
This issue doesn't happen when using Google Chrome.
Had anyone an simlar issue using elog with IE? It would be great to have some help with that issue.
Thanks
Torsten |
28
|
Fri Mar 28 10:23:50 2008 |
svrmarty | svrmarty@gmx.net | Other | ELOG V2.7.3-2080 debian amd64 package | Stable | Fri Mar 28 10:23:55 2008 by svrmarty |
|
150
|
Fri Feb 21 19:05:18 2020 |
Laurent Jean-Rigaud | lollspam@free.fr | Other | RPM build process enhancements | Stable | Fri Feb 21 19:14:53 2020 by Laurent Jean-Rigaud |
Hi Stefan,
I enclosed a patch for RPM build process available on GIT.
changes :
- rpmbuild :
- checks if provider or custom build (the rm/mv are done on your computers only :-))
- call rpmbuild with version / release given as parameters
- elog.spec :
- last changelog entry date is set to build date
- build with debug for debuginfo rpms (product rpms are normally automatically strimmed)
- elog.init call /etc/ini.d/functions for RHEL/Centos/Fedora/? dists
Todo:
- add RPMbuild options for ldap/pam/...
- enclosed git log in changelog automatically (the dream :-))
|
155
|
Fri Dec 1 16:30:46 2023 |
Stefan Ritt | Unstefan.ritt@psi.ch | Other | Re: Fixing repeating first inline_image in email | Stable | Fri Dec 1 16:31:37 2023 by Stefan Ritt |
Unfortunately you made your changes against a pretty old version of elogd.c, so I can't see which changes you made (the diffs gives 100's of changes now). If you can apply your fix against the current elogd.cxx from the bitbucket repository, I would be happy to include the fix in the distribution.
Stefan
rami khrais wrote: |
Fixing repeating first image in email (email notification) when the user submit a new log with in_line images.
|
|
8
|
Wed Feb 4 11:24:14 2004 |
Fred Hooper | fhooper@sushisoft.com | Script | Javascript for Bookmark Link for one-click submission to elog | Alpha | February 04, 2004 by Stefan Ritt |
I have created a javascript to be used as a browser link that allows a one
step cut and paste from a web browser into a elog logbook.
The intended application is allow a user to do a text selection in a web
browser, then click on a bookmark that automagically pastes the selected
text, the current browser page url, and the current browser page title into
a pre-defined elog logbook. I do some research where I would like to save
some text from a webpage, but also have a record of where the webpage came
from. However, you should find that you can extend this script in a varity
of ways for your own application.
The script is a simple one: it uses javascript in a saved bookmark to get
your selected text, title, and url, and then creates a new browser window
with a elog form, and print the document variables into the form, and then
submits the form to elog. The key advantage to this approach is that you
can use the "post" command, rather than "get", to submit to the text section
of an elog logbook. The only way I found now to submit to elog via a
bookmark is using the "get" command, and it doesn't allow entry of the
"text" field, only attribute fields.
The second major advantage to using POST is that you can submit a much
large quanity of information ; However, some checking on this leads me to
believe that the limit is browser and server depended, so YMMV. However, a
great discussion on the limits of browsers can be found here:
http://www.squarefree.com/bookmarklets/browsers.html .
One of the major limits is that IE6.0 browsers have a maxium of 508 bytes
per bookmark - This book runs over 800 bytes, so I suspect tha IE6+ will
not allow it. I tested the link with Mozilla and Firebird 0.7.
This script will need to edited for you to use with your elog logbook.
The script should be fairly self-explainitory, if you are used to html
forms and have some exposure to javascript.
You will need to modifiy the following fields:
1) in form action = http://<your_domain.com>/elog/<logbook>/?cmd=New
change the link to point to your specific logbook to be used for entry.
2) the attribute fields need match up with the ones in your logbook.
The ones listed in the template are Author, Email, Title, and URL.
If you have fixed fields (like Author and Email), then you can
predefine these fields as shown.
I have the page title used as the entry for Title, and the page url is
use as the URL attribute.
Finally, I have the text selection used as the entry for the Text field.
You can add additional fields by creating a new <input ...> segment
in the script. For those more clever than me, you can concatinate the
title, url and selection to paste into the Text area as well.
3) once you have a edited version of the script (make sure you keep it as a
single line), you can then create a new bookmark in your browser, and then
paste the script into the properties->location field (for Mozilla/Firebird)
or the properites->url field (IE). Give it a good name like "post to elog"
4) once saved, you can then go a web page, select some text, and then go to
your bookmarks and click on the bookmark. It should then create a new
window in elog with a completed logbook entry.
some notes:
1) again, this may not work on IE6+ browsers due to M$ limitations.
2) You may have to be logged in already to elog for this work - I have not
tested the interaction using a password protected elog
3) You can only post to a single elog logbook - You'll need to have
multiple bookmarks for multiple logbooks.
__________________________
Note added by Stefan Ritt:
I zipped the attached JavaScript, since our email router does not allow .js
file name extensions. |
19
|
Sat Oct 21 02:23:17 2006 |
Leo Souza | leo@leo.com | Documentation | teste abc | Stable | 1.0 |
alksjdkajklasjdas |
45
|
Thu May 7 09:14:25 2015 |
Christof Hanke | hanke@rzg.mpg.de | Script | systemd-unit file | Stable | 1 |
sample systemd-unit file.
Use it as you like. |
3
|
Fri Jun 6 18:32:14 2003 |
Tomas Rudolf | tomas@mba.be | | ELOG Syntax highlighting in UltraEdit | | |
Maybe some of you use UltraEdit code editor (http://www.ultraedit.com/) to
create/modify your ELOGD.CFG files.
Well, in that case we hope you find useful the attached syntax highlighting
configuration file.
To intstall this file into UltraEdit :
MENU --> ADVANCED --> CONFIGURATION --> SYNTAX HIGHLIGHTING tab --> OPEN
WORDLIST
You can also download the latest version from our website :
http://public.mba.be/demo/elog/u-edit-elog-syntax.txt |
4
|
Fri Jun 13 17:10:48 2003 |
Sridhar Anandakrishnan | sak@essc.psu.edu | | submit emails to elog (along with MIME attachments) | | |
Attached is a perl script to which you can pipe a message (or a
single-message file) to submit that message to `elog'. The `elog'
distribution includes two programs `elogd', which is the main daemon that is
accessed via the browser, and `elog', which is a command-line interface to
elogd.
The attached perl script `mailelog', will split a multipart MIME message
into its components and submit each as an attachment to elog to create a new
entry in a specified logbook. The attributes are the subject, from, and cc
of the message.
Usage: mailelog [-|file] [-l logbook]
(if there are no arguments, read from stdin)
(makes a command that looks like this:
elog -p 8080 -h localhost -l emails -a subject=<subject> -a from=<from> -a
cc=<cc> -f attachment-1 -f attachment-2 -f ...
attachment-1 is the body of the message and attachment-2... are the actual
MIME attachments. Set the elogd configuration to display attachments, so
that the message body is immediately visible.
Defaults: -h localhost -p 8080 -l emails
If no `-l logbook' flag is specified, then the entry is sent to the `emails'
logbook, so make sure that logbook exists. Save this in, e.g,
~/bin/mailelog, and make sure it is executable (`chmod +x mailelog') and on
your path (bash: `export PATH=$HOME/bin:$PATH' or csh/tcsh: `setenv PATH
$HOME/bin:$PATH')
Bugs: multi-message files don't work. can't add other attributes. if the
logbook doesn't have attributes subject, from, cc, they are quietly lost. |
5
|
Thu Jul 3 17:04:58 2003 |
Fred Hooper | fhooper@sushisoft.com | | elog2sql - version 0.99 - scripts to convert an elog logbook to a MySQL database | | |
Announcing: elog2sql
elog2sql was created to help translate logbooks created by the program
``elog'' from the native elog flat file format to a MySQL database. I had a
need to have the elog data in a database, and it appears from the forum that
several others had a similar need.
I created a set of perl scripts that will allow the translation of elog
logbooks into a MySQL database. The design and implementation of these
scripts are a simple one, and allow the one-time copying of a set of logbooks.
The elog2sql toolkit consists of two scripts. The first script, parsecfg.pl,
reads a elogd.cfg, and creates a sql file that will create a set of db
tables corresponding to elog logbooks. The second script, parselog.pl, takes
a set of elog logfiles, and creates a sql file that will enter the logbook
data into the database. The result is a copy of the elog logbook that can
used as desired inside the framework of MySQL. Attachments are handled by
inserting an entry of the attachment name into an seperate attachment table.
This allows multiple attachments per entry.
You can download the elog2sql program archive at
http://www.davidfannin.com/elog2sql/elog2sql.tar.gz . It contains the
scripts and basic documentation. You can read the man page at
http://www.davidfannin.com/elog2sql/index.html
I have also uploaded a copy of the archive here.
email me for questions or comments. |
7
|
Wed Jan 14 18:30:34 2004 |
Francois Cukier | Francois.Cukier@Umontreal.ca | Theme/Skin | Bubble for pleasure 1 -- still under developpement but working ;) | Beta | |
Uncompress "Bubbleforpleasure1.zip" in your Themes\default folder if you
want to replace the original elog theme. Otherwise, if you decompress it in
another folder, you will need to modify your elogd.cfg file as described at
this adress: http://midas.psi.ch/elog/config.html |
10
|
Fri Sep 24 23:14:47 2004 |
Sridhar Anandakrishnan | sak@essc.psu.edu | Script | Perl script to forwar emails to elog | Alpha | |
Takes one or more files from the command line that contain MIME
messages, and explodes their contents out into /tmp. The parts
are sent to elog as attachments. |
11
|
Wed Nov 24 23:45:19 2004 |
damon nettles | nettles@phgrav.phys.lsu.edu | Other | Steps for securing Elog using SSL and Apache | Stable | |
Everything in this guide was done on a full install of Fedora Core 3 running
Apache 2.0. If you are using an older version of Apache some of this may not
work, so I recommend upgrading. Also, on different Linux distributions, some
of the paths may be different.
The goal here is to get Elog set up under Secure Socket Layers, so that
communication both ways is encrypted. This will cover any password
transactions so nothing gets sent over the web in the clear.
The previous method of securing the Elog, which involved using stunnel, is
out of date. A better way to go is to use the Elog in conjunction with
Apache. The Apache method leverages all the research and development that's
gone into providing secure sockets for Apache, and removes the need for any
serious reinventing of the wheel.
We begin with a web server running on port 80 and an Elog server running on
port 8080.
Making Certificates:
It's necessary to generate some secure certificates to be issued to anyone
who attempts to access the securesite.
A guide to making the certificates can be found at:
http://slacksite.com/apache/certificate.html
So, following the steps in the article:
openssl genrsa -des3 -rand file1:file2:file3:file4:file5 -out\
server.key 1024
where the \ is merely an indicator that the command wouldn't fit on a line
here. The fileN references are sources of random information to help the
random number seed be more random. I merely used some personal text files
that were zipped up, as suggested in the page.
openssl rsa -in server.key -out server.pem
Removes the RSA encryption from the key, to make it easier for the Apache
server to deal with it.
openssl req -new -key server.key -out server.csr
Starts a line of questioning about us as a certificate issuing entity.
Answer with reasonable values.
openssl x509 -req -days 60 -in server.csr -signkey server.key -
out\
server.crt
After this move the server.pem, server.crt, and server.csr to the
appropriate directories under /etc/httpd/conf/ . The extensions explain
which directory to put them in, with the exception that server.pem ended up
in etc/httpd/conf/ssl.key/ .
In the elogd.cfg file, change the port to 8079, and set the URL to
"https://your.host.name/" . Restarting the Elog daemon now leaves us with
Elog listening to port 8079 instead of port 8080.
The rest of the story is in the "elogredirect.conf" file attached to this
post, but here are the highlights.
Create a virtual host dealing with SSL that listens to port 443 (the ssl
port), and acts as a proxy for port 8079 (where Elog is listening). This
allows Apache to act as an SSL handler for Elog by handing off any access at
https://your.host.name/ to the Elog server. The firewall then can keep out
any direct attempts to access port 8079, so that the only thing that can
reach the Elog server is stuff talking to 8079 on the local side of the
firewall (which pretty much means just the Apache proxy). I recommend
Firestarter for the firewall config by the way, it's a real lifesaver.
http://firestarter.sourceforge.net/
This covers the SSL portion of the story, and by doing the redirection
inside the port 443 virtual host, instead of from the port 80 webpage as
before, you can avoid any path overlap.
As was the case for us, you may have links in older Elog posts, e-mails, or
web pages that point to specific Elog posts. If you have been using Elog for
some time and never bothered with the SSL stuff, the links most likely look
something like
http://your.host.name:8080/yourlogbook/postnumber.
To cover legacy support for calls on port 8080, you can create another
virtual host listening to port 8080. This host's job is to take any
incoming URL calls on "http://your.host.name:8080/a_directory" and
translate them into calls on "https://your.host.name/the_same_directory" .
This means that any attempt to contact the Elog on port 8080 will get
answered by an Apache virtual host that redirects the client through the
Apache SSL virtual host described above. See the conf file for the details.
So in the end, the firewall is set to only allow through ports 80, 443, and
8080. Port 80 handles the normal webpage access stuff. Port 443
exclusively handles the SSL port for the Elog daemon, and port 8080
exclusively handles the redirect for the legacy Elog calls.
Implementation of this setup on another system should be pretty
straightforward. Apache's config file is at /etc/httpd/conf/httpd.conf ,
and it also loads any *.conf files in /etc/httpd/conf.d/ . So its a pretty
simple case of just dropping elogredirect.conf into /etc/httpd/conf.d/ and
restarting the Apache server. Of course the necessary changes to elogd.cfg
have to be made and that server restarted as well. The firewall, too, needs
to be setup to secure the whole deal. Note that the elogredirect.conf file
needs to be edited for your specific setup (changing the instances of
"your.host.name" to whatever your server is, and also putting in the
administrator e-mail address where it is noted).
This work was done by Jonathan Hanson and Damon Nettles in the Gravity Lab
at Louisiana State University. You can see our Elog at
https://sam.phys.lsu.edu/elog .
If you have any questions or comments send them to
nettles@phgrav.phys.lsu.edu . |
16
|
Wed Sep 7 16:52:30 2005 |
Peter Eriksson | peter@ifm.liu.se | Other | Solaris 10 SMF/Greenline management manifest for ELog | Stable | |
Please find enclosed as an attachment a Solaris 10 SMF/Greenline manifest that can be used to manage ELog.
(If you don't know what it is - it replaces init.d/cron/inittab and more stuff) |
18
|
Mon Sep 25 11:24:05 2006 |
Yoshio Imai | | Documentation | securing of elog with stunnel v4 under Linux | Beta | |
The following instructions should work in securing the elog using stunnel version 4 under Linux. The specific paths may have to be adapted to your distribution. A sample configuration file is attached. |
20
|
Wed Jan 10 23:08:27 2007 |
Exaos Lee | Exaos.Lee@gmail.com | Script | Script for running ELOGD on Ubuntu Linux | Stable | |
I prepared one init script for ELOGD running on Ubuntu Linux.
Please see the attachment. |
21
|
Tue Feb 20 18:20:40 2007 |
Val Schmidt | vschmidt@ldeo.columbia.edu | Documentation | Secure elog with SSL under Apache2 on Ubuntu | Stable | |
The steps for configuration under Apache2 are a bit different. Below I've included a quick list of instructions for Ubuntu. One nice thing about this method, is that only https requests to https://your.url/elog are redirected (not all https connections to your url) so you can have other services running under ssl:
My Setup:
Ubuntu 6.10 (Edgy):
Linux tide1 2.6.17-11-generic #2 SMP Thu Feb 1 19:52:28 UTC 2007 i686 GNU/Linux
Packages:ii apache2 2.0.55-4ubuntu4 next generation, scalable, extendable web se
ii apache2-common 2.0.55-4ubuntu4 next generation, scalable, extendable web se
ii apache2-mpm-worker 2.0.55-4ubuntu4 high speed threaded model for Apache2
ii apache2-utils 2.0.55-4ubuntu4 utility programs for webservers
ii elog 2.6.1+r1642-1 Logbook system to manage notes through a Web ---
To setup ssl in apache2 for elog I started here:
This min-howto was kindly provided in a forum. I reproduced it here without permission.
A Mini-Howto for apache2:
apt-get install apache2
apache2-ssl-certificate
(and answer the questions)
Now, enable ssl:
a2enmod ssl
configure ssl:
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl
"/etc/apache2/sites-enabled/ssl" should look like this:
NameVirtualHost *:443
<VirtualHost *:443>
(... configure the directories too...)
and "/etc/apache2/sites-enabled/default" should look like this:
NameVirtualHost *:80
<VirtualHost *:80>
(... configure the directories too...)
In /etc/apache2/ports.conf, add Listen 443
In the middle of /etc/apache2/sites-available/ssl file, insert this two lines:
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
Hope it helps :)
This method, without configuraiton of any of the <Directory> directives in /etc/apache2/sites-available/ssl, makes everything in /var/www https accessible. This may not be desirable. Configure the directives as you see fit.
To get SSL forwarding going for elog, in /etc/apache2/sites-available/ssl, I added the following:
ServerName tide1.unh.edu
ProxyRequests Off
ProxyPreserveHost On
<Location /elog/>
Order allow,deny
allow from all
ProxyPass http://tide1.unh.edu:8080/
ProxyPassReverse http://tide1.unh.edu:8080/
SSLRequireSSL
</Location>
Once this is in place one must restart apache with
sudo /etc/init.d/apache2 force-reload
In /etc/elog.conf I added:
URL=https://tide1.unh.edu/elog
and restarted elog as above.
Finally, I removed the firewall entry that allowed connections to port 8080 for non-secure elog.
Items of note:
The "apache2-ssl-certificate" created a certificate that seems to expire in 30 days. This obviously not ideal. More details about how to create certificates can be found at HERE. At some point in the future, we'll have to figure this out and create a more appropriate certificate. |