blogd(8) FreeBSD System Manager's Manual blogd(8)
NAME
blogd -- Blog Server
SYNOPSIS
blogd
DESCRIPTION
Blogd is an SCGI application server dedicated to serving-up a single
blog, implemented in 1000 lines of Munger. Because Munger is an inter-
preted language, blogd is not suitable for high demand use.
Blogd 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. Blogd does not provide means for users to leave com-
ments on articles, because that is its author's preference. Blogd is
distributed under a BSD-like license, found in the file LICENSE, in the
blogd distribution.
Blogd 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.
Blogd 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 blogd-add on a text file. To
modify an article, the user extracts the article to a file with blogd-
extract, edits the file, then updates the database with blogd-replace.
Posts may be deleted with blogd-delete. The user has free reign to add
markup to his or her posts.
CONFIGURATION
To configure blogd follow these steps.
1. Edit /usr/local/etc/blogd-config appropriately for your system.
This file contains lisp assignments, describing all the user-modifi-
able settings of blogd, and is loaded into blogd when it starts. If
you modify this file, you must restart blogd for the changes to take
effect. Each setting is documented with a comment.
2. After editing /usr/local/etc/blogd-config, configure your web server
to forward requests for the blogd 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 config-
ure 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 blogd. It could be
created like this:
touch blog.scgi; chown www blog.scgi; chmod 500 blog.scgi
3. A stylesheet is provided in the blogd distribution, installed in
/usr/local/etc named blog.css.sample. Copy it to where your web-
server can find it, and rename, chown, and chmod it, appropriately.
Use this sample file as a starting point for defining the appearance
of your blog. It is documented internally with comments.
4. Add
blogd_enable="YES"
or
blogd_enable="NO"
to /etc/rc.conf, depending upon whether or not you want blogd
started at system start-up. With the former setting, the following
commands are available:
/usr/local/etc/rc.d/blodg start
/usr/local/etc/rc.d/blodg stop
/usr/local/etc/rc.d/blodg restart
/usr/local/etc/rc.d/blodg status
With the latter setting, the following commands must be used:
/usr/local/etc/rc.d/blodg forcestart
/usr/local/etc/rc.d/blodg forcestop
/usr/local/etc/rc.d/blodg forcerestart
/usr/local/etc/rc.d/blodg forcestatus
5. Read the short header comments of blogd-add, blogd-replace, blogd-
extract, and blogd-delete, all residing in /usr/local/bin. The com-
ments tell you how to invoke the scripts.
6. Restart your web server, and start blogd using the appropriate com-
mand. Fire up your browser and check it out.
I hope you find blogd useful.
AUTHORS
James Bailie <jimmy@mammothcheese.ca>
http://www.mammothcheese.ca
Jun 12, 2009