Cape Portegé SSI Example

greetings on

Timestamps seem to be an issue on this old box. If it's set correctly it still may show UTC. or it may revert to the time in the BIOS, which in turn may reset to zero (1990) because the system battery is defunct. Working on it.


To make server side includes work, you must have the statically linked program ssi available, your thttp config must point to a correctly formed cgipath, and then your url must point to the ssi program with the file you want parsed passed as an argument. For instance, the link to here was actually formed as

<A HREF="/cgi-bin/ssi/rgm.fabbnet.net/ssi_exam.htm">

where the first part of the url is the ssi executable and the rest is the full path on this virtual-hosting box to the file being parsed.

There are not a lot of directives you can use, but you can echo basic variables, include external files, and get information about files. There is no <exec> directive, however, and probably never will be.

So here are some other typical uses for server side includes under thttpd

This document is  

It's URI is  

Today is  

Example of file listing:

Name Size (bytes) Date Time Description
index.html Root Web page
ssi_exam.htm SSI Example Web page
/ssi SSI executeable

Redirects

thttpd can also handle redirects. For example, on this site I could try to redirect 'http://rgm.fabbnet.net/redirect.html" somewhere else.

You control the redirects via a hidden file in the cgi directory within the chroot tree. The file lists the url you want redirected, and the actual url you want executed. The re-directed URL should be a symbolic llink to the redirect executable in the cgi directory.

Here's my control file (via an imbedded #include virtual directive,) which would (theoretically) redirect redrect.html to another of my useless web sites:



One does have to be careful with imbedded links in pages processed by the ssi or redirect programs. The link below will not work if I use a simple file name, because ssi will process it as it prepares the page and add itself as a pre-processor. Not good. So I construct the link with the complete url…

<A HREF="http://rgm.fabbnet.net">

I've also found that graphics on a same page processed with ssi can be a problem. They apparently stop loading as soon as the ssi program stops processing. Pretty ugly. I've tried putting the graphics in separate <include file> directives, but that didn't work. Meanwhile,

Back to Main Page

This page was last modified on: