GNHLUG> Main Web>LocalTWikiDocs>TWikiMods (revision 3)EditAttach

Local Modifications to TWiki

This page documents some notable local behind-the-scenes modifications to the TWiki software. Relevant only to those ServerPeople with SSH access. See also AdminLog for a chronological (as opposed to current-state) view of things.

See also: TWikiFiles, TWikiPerms

File Structure

A new doc subdirectory was created. The documentation present at the top-level (README, LICENSE, and such) were moved to this directory. Various sample files found in misc and bin directories were moved here as well. The now-empty misc directory was removed.

A new log subdirectory was created. Twiki was configured to write its log files there (instead of mixing logs in with page data as is the default). This is done in LocalSite.cfg in the various cfg{FooLogName} directives. log/old was also created, and logrotate was configured to rotate files there on a daily basis. (The built-in TWiki log rotation, which rotates monthly, yields unwieldy large log files.) The {Stats}{LogFileGlob} config directive was changed to access.????-??-??-???? (plus path) to match. Log files are separately compressed after 45 days, by the gnhlug_maint script. Since that glob does not match *.xz files, older logs are automagically excluded from consideration by the statistics script.

A webroot subdirectory was created for the Apache DocumentRoot. It only holds a single index.html telling people if they can see that file, things are broken.

A static subdirectory was created to contain a handful of static resources that are maintained outside of TWiki. The TWikiFiles page details them.

User Registration

The bin/register CGI script has Apache HTTP authentication placed in front of it, controlled by the bin/.htpasswd file. This is done to place a password on the registration process, to block spam robots. The actual password is currently disclosed on the public TWiki website. The theory is that spammers are unlikely to read the instructions to that level of detail. Should this prove inadequate, the password can be changed and only disclosed by email or some other method.

The lib/TWiki.cfg has a 1-line modification to purge the REMOTE_USER variable from the environment, to prevent TWiki from ever using Apache HTTP authentication for TWiki account identification. This is needed because of the password on bin/register as described above. Otherwise, TWiki would pick up the register user from Apache, and think the user was logged in as register.

Template Tweaks

The following files in "templates/" have been modified, mainly to use our custom contact form (GNHLUG.ContactUs) instead of an email address.

  • twiki.tmpl
  • viewbottombar.pattern.tmpl
  • login.tmpl
  • watchlistdigestnotify.tmpl
Edit | Attach | Watch | Print version | History: r7 | r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 2023-12-26 - BenScott
 

All content is Copyright © 1999-2025 by, and the property of, the contributing authors.
Questions, comments, or concerns? Contact GNHLUG.
All use of this site subject to our Legal Notice (includes Terms of Service).