Hi,

I'm writing a test framework for a website that runs under Rivet. I'm specified a Tcl script as the target of RequestHandler, but that script does not seem to be invoked.

RivetServerConf RequestHandler "/home/Shares/Engineering/Web/rivet-www-base/source/index.tcl"

I know the path is correct because I get crit errors in the error log if I change to something that doesn't exist.

I know the script will run under rivet because I copied it over to the document root and with Lynx I access URL .../index.tcl and it comes up with the log message and the 500 response that the script returns (as a test).

But accessing http://.../ just returns a 404 with the text "The request URL was not found on this server."

Nothing in the logs and the log message the script will record, never appears in the log.

My test apache.conf is:

# Apache test configuration sample simpleindex at Tue Mar 10 23:37:39 AEDT 2026

ServerRoot "/home/Shares/Engineering/Web/rivet-www-base/tmp"
PidFile "/home/Shares/Engineering/Web/rivet-www-base/tmp/apache.pid"

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog "/home/Shares/Engineering/Web/rivet-www-base/tmp/logs/access.log" common
ErrorLog "/home/Shares/Engineering/Web/rivet-www-base/tmp/logs/error.log"

Listen 20080

LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
LoadModule negotiation_module /usr/lib/apache2/modules/mod_negotiation.so
LoadModule rivet_module /usr/lib/apache2/modules/mod_rivetsvpts240102.so

LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so
RivetServerConf MpmBridge prefork
RivetServerConf SeparateVirtualInterps no

<IfModule mod_mime.c>
    TypesConfig /etc/mime.types
</IfModule>

<IfModule mod_rivet.c>
    AddType application/x-httpd-rivet .rvt
    AddType application/x-rivet-tcl .tcl
</IfModule>
RivetServerConf ChildInitScript "source {/home/Shares/Engineering/Web/rivet-www-base/source/serverinit.tcl}" RivetServerConf RequestHandler "/home/Shares/Engineering/Web/rivet-www-base/source/index.tcl"

<VirtualHost localhost:20080>
    DocumentRoot "/home/Shares/Engineering/Web/rivet-www-base/samples/simpleindex"
    ServerName sample_simpleindex

    RivetServerConf ChildInitScript "source {/home/Shares/Engineering/Web/rivet-www-base/samples/simpleindex/childinit.tcl}"     RivetServerConf RequestHandler "/home/Shares/Engineering/Web/rivet-www-base/source/index.tcl"

    CustomLog "/home/Shares/Engineering/Web/rivet-www-base/tmp/logs/access.log" common

    <Directory "/home/Shares/Engineering/Web/rivet-www-base/samples/simpleindex">
        Options All Indexes MultiViews
        AllowOverride None
        Require all granted
    </Directory>

</VirtualHost>

I'm running Debian 12 on this sever and it's Rivet module doesn't appear to have the Rivet_RawPost patch applied yet, so I have to run my own patched. I compiled that from source back on 2nd Jan 2024.

Debian 12 has -

libapache2-mod-rivet-doc/oldstable,now 3.2.2-1 all [installed]
libapache2-mod-rivet/oldstable,now 3.2.2-1 amd64 [installed]

My production Rivet web server is different and there I have a rule to rewrite _all_ requests and forward to the index.tcl script, and that's worked fine for a long time. But I thought that this RequestHandler directive would do the same thing but without needing any rewriting.

I've probably read the documentation incorrectly (https://tcl.apache.org/rivet/manual3.2/processing.html). I did look for a working example of RequestHandler but I can't see anything there in the tcl-rivet source.

Could you please shed some light on this and perhaps show a working example of the RequestHandler directive?

Kind regards,

Scott




--
+-----------------------------------------------------------------------------+
|...will make the wilderness a pool of water, the dry land springs of water...|
+-----------------------------------------------------------------------------+
| Scott [email protected] |
| +61-3-9008-5695 (B)                                  SVP Technical Services |
|PGP:https://gnupg.org/                                   ABN 79 220 496 603 |
|KEY:https://pgp.mit.edu/pks/lookup?op=vindex&search=0xEDBE43639EFD884D      |
+-----------------------------------------------------------------------------+

DISCLAIMER:
The content of this email is confidential and strictly intended only for the
recipient(s) specified in the message. If you have received this message by
mistake it is strictly forbidden to keep this email in any form, electronic
or hard copy, or to share any part of it with any one else, without the prior,
written consent of the author. If you have received this message by mistake,
please let me know by replying to this email, and then destroy it and any
copies.

SECURITY:
I prefer to send and receive confidential messages protected by PGP public
key encryption. If you are willing to or are interested in protecting our
email communication with PGP encryption, please refer tohttps://gnupg.org/.

Attachment: OpenPGP_0xEDBE43639EFD884D.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to