ephemera(8) FreeBSD System Manager's Manual ephemera(8)
NAME
ephemera -- Blog Server
SYNOPSIS
ephemera
DESCRIPTION
Ephemera is an SCGI application server dedicated to serving-up a single
blog, implemented in 1000 lines of Munger.
Ephemera creates the simplest blog that is still useful, in its author's
estimation, providing a calendar-driven browsing tool, a search facility,
and an rss feed. Ephemera does not provide means for users to leave com-
ments on articles, because that is its author's preference. Ephemera is
distributed under a BSD-like license, found in the file LICENSE, in the
ephemera distribution.
Ephemera does not use cookies to store any information on the client
side, nor does it need an HTTPS capable web server. The article database
is stored in a single SQLite database file. The blog's main page is
stored statically for performance, and is regenerated whenever ephemera
starts, or the database is modified.
Ephemera is intended for use by those who have access to a server on
which they are permitted to install software, who know XHTML and CSS, and
are competent and comfortable working with text editors, ssh, and the
shell. It is not intended for the general user lacking these skills.
Blog content is added or modified by four command-line munger scripts.
To add an item to the blog, the user runs ephemera-add on a text file.
To modify an article, the user extracts the article to a file with
ephemera-extract, edits the file, then updates the database with
ephemera-replace. Posts may be deleted with ephemera-delete. The user
has free reign to add markup to his or her posts.
CONFIGURATION
To configure ephemera follow these steps.
1. Edit /usr/local/etc/ephemera-config appropriately for your system.
This file contains lisp assignments, describing all the user-modifi-
able settings of ephemera, and is loaded into ephemera when it
starts. If you modify this file, you must restart ephemera for the
changes to take effect. Each setting is documented with a comment.
The value you define for "static_main" determines what the toplevel
URL of your blog will be.
2. After editing /usr/local/etc/ephemera-config, configure your web
server to forward requests for the ephemera SCGI resource you have
described with the "host", "path", and "name" variables, to the host
and port you have described with the "host" and "port" variables.
How to configure your web server to forward requests via SCGI will
be described in your server's documentation.
For example, the drood web server requires the -d and -s options to
be present on the command line. The -d option defines the (S)CGI
directory. The -s option maps a filename suffix to a host/port
pair. Requests for entities with the specified suffix in the speci-
fied direcory will be forwarded to the application server listening
on the specified host and port. The relevant options would look
something like this:
-d cgi-bin -s '127.0.0.1|4000|scgi' -u www
Drood also requires all requested entities to exist in the filesys-
tem, so an empty file must be created in the (S)CGI directory, with
the .scgi suffix and the appropriate ownership and permissions to
make the server believe it can run the file. This file is merely a
dummy entity, which will never be accessed by ephemera. It could be
created like this:
touch blog.scgi; chown www blog.scgi; chmod 500 blog.scgi
3. A stylesheet is provided in the ephemera distribution, installed in
/usr/local/etc named ephemera.css.sample. Use this sample file as a
starting point for defining the appearance of your blog. It is doc-
umented internally with comments. Copy it to where your webserver
can find it, and rename, chown, and chmod it, appropriately, accord-
ing the to value you have set for the stylesheet variable in
/usr/local/etc/ephemera.config.
4. Add
ephemera_enable="YES"
or
ephemera_enable="NO"
to /etc/rc.conf, depending upon whether or not you want ephemera
started at system start-up. With the former setting, the following
commands are available:
/usr/local/etc/rc.d/ephemera start
/usr/local/etc/rc.d/ephemera stop
/usr/local/etc/rc.d/ephemera restart
/usr/local/etc/rc.d/ephemera status
With the latter setting, the following commands must be used:
/usr/local/etc/rc.d/ephemera forcestart
/usr/local/etc/rc.d/ephemera forcestop
/usr/local/etc/rc.d/ephemera forcerestart
/usr/local/etc/rc.d/ephemera forcestatus
5. Read the short header comments of ephemera-add, ephemera-replace,
ephemera-extract, and ephemera-delete, all residing in
/usr/local/bin. The comments tell you how to invoke the scripts.
6. Restart your web server, and start ephemera using the appropriate
command. Fire up your browser and check it out.
I hope you find ephemera useful.
AUTHORS
James Bailie <jimmy@mammothcheese.ca>
http://www.mammothcheese.ca
Jun 12, 2009