A Blog that fit’s in the Pocket (4)

A Blog that fit’s in the Pocket

A Very Tiny Blog   — (machine)

(continued from page 3)

Once my visitor has been redirected to the startup page, we’d want the URL in his/her address bar to reflect the fact that we moved him.  We don’t want it to be the badly mis-spelled “SailorHtc_blg_sote.com” anymore, do we?

Fortunately, Hiawatha has very nice URL rewriting and redirection facilities, similar to those of the Apache webserver.  Unlike Apache, which requires an external module for those things, Hiawatha has it built-in.

So, here’s some detail about the Hiawatha configuration (showing only the part that redirects):

UrlToolkit {

   ToolkitID = boatServer

   Match ^/(.*) Redirect http://www.steelieschooner-ap-virtual.sea/index.html$1


Then, someplace in the default website section, I've put this:

UseToolkit = boatServer

And that's it - redirection, URL bar fixing, and AFAIK its' pretty simple.  Note
that I'm using this in a private way, and not exposing it to the real internet.  
Probably things would be done differently in the latter case, and one would need
to worry more earnestly about security issues.  I'm not covering those.

It’s (seemingly) painless.  I’m not saying there’s not a better way (probably is) – but I find myself logging in just to watch a painless web blog pop up on the screen.  So, what else is there to do?  For launching the series of programs that run Sailor_Hutch’s blog, I use local scripts from rc.conf:

  • local_startup=”/usr/local/etc/blog-startup-scripts”

If viewers don’t recognize this line from /etc/rc.conf, then they likely are not running the FreeBSD operating system.  It simply specifies a directory where all the scripts (contained in that directory) are executed for the types of apps a user might install, meant to be launched at boot.

Some things have to happen before other things, and sometimes a time delay works to make sure part A is ready before part B needs it.  So, my scripts have some sleeps in them between certain parts.  I launch only PHP, Hiawatha, and Squid inside of those scripts.  The other things (hostapd, unbound, dhcpd, pf, etc) are launched easily from within rc.conf (with xxxx_enable statements).  Squid?  Only on occassion I use it.  The blog setup does not.

To be continued …

Note: WordPress is under the guardianship of the WordPress Foundation, and WordPress.com is a service provider owned by Automattic, Inc. Neither has any association with this author, even though this blog is hosted there! This author is making no claims whatsoever about the accuracy of the given info, or whether or not the configurations are correct.

Hiawatha webserver is a nice piece of software maintained by the people (actually I think it is one person) – at hiawatha-webserver.org – and they have no affiliation with this author or site. Likewise, SQLite and its author(s) have no relationship with this site.