# Module of TWiki Collaboration Platform, http://your.domain.com/twiki # # Configuration file for TWiki, held in 'lib' directory. # # See 'setlib.cfg' in 'bin' directory to configure non-standard location # for 'lib' directory or Perl modules. # # Copyright (C) 1999-2003 Peter Thoeny, peter@thoeny.com # # For licensing info read license.txt file in the TWiki root. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details, published at # http://www.gnu.org/copyleft/gpl.html # # Notes: # - Latest version at http://twiki.org/ # - Installation instructions in $dataDir/TWiki/TWikiDocumentation.txt # - Customize variables in TWiki.cfg when installing TWiki. # - Optionally create a new plugin or customize DefaultPlugin.pm for # custom extensions of rendering rules. # - Upgrading TWiki is easy as long as you only customize DefaultPlugin.pm. # - Variables that can be accessed from topics (see details in # TWikiDocumentation.html) : # %TOPIC% name of current topic # %WEB% name of current web # %SCRIPTURL% base TWiki script URL (place of view, edit...) # %SCRIPTURLPATH% like %SCRIPTURL%, but path only (cut protocol and domain) # %SCRIPTSUFFIX% script suffix (empty by default, ".pl" if required) # %PUBURL% public URL (root of attachment URL) # %PUBURLPATH% path of public URL # %ATTACHURL% attachment URL of current topic # %ATTACHURLPATH% path of attachment URL of current topic # %DATE% today's date # %WIKIVERSION% tool version # %USERNAME% login user name # %WIKIUSERNAME% wiki user name # %MAINWEB% main web name (Main) # %TWIKIWEB% TWiki system web name (TWiki) # %HOMETOPIC% home topic name (WebHome) # %NOTIFYTOPIC% notify topic name (WebNotify) # %WIKIUSERSTOPIC% user list topic name (TWikiUsers) # %WIKIPREFSTOPIC% site-level preferences topic name (TWikiPreferences) # %WEBPREFSTOPIC% web preferences topic name (WebPreferences) # %STATISTICSTOPIC statistics topic name (WebStatistics) # %INCLUDE{...}% server side include # %SEARCH{...}% inline search # variables that need to be changed when installing on a new server: # ================================================================== # ---- Windows paths should normally be written as "c:/foo" not "c:\foo" # ---- (which doesn't do what you may think it does). You can use '\' # ---- without problems inside single quotes, e.g. 'c:\foo'. # URL for TWiki host : (e.g. "http://myhost.com:123") $defaultUrlHost = "http://your.domain.com"; # %SCRIPTURLPATH% : cgi-bin URL path for TWiki: $scriptUrlPath = "/twiki/bin"; # %PUBURLPATH% : Public data URL path for TWiki (root of attachments) : $pubUrlPath = "/twiki/pub"; # Public data directory (file path not URL), must match $pubUrlPath : $pubDir = "/home/httpd/twiki/pub"; # Template directory : $templateDir = "/home/httpd/twiki/templates"; # Data (topic files) root directory (file path not URL): $dataDir = "/home/httpd/twiki/data"; # Log directory for log files, debug and warning files. Default "$dataDir" : $logDir = "$dataDir"; # FIGURE OUT THE OS WE'RE RUNNING UNDER - from CGI.pm # ================================================================== # Some systems support the $^O variable. If not # available then require() the Config library unless ($OS) { unless ($OS = $^O) { require Config; $OS = $Config::Config{'osname'}; } } $detailedOS = $OS; # Save more detailed OS information if ($OS=~/darwin/i) { # MacOS X, suggested by Todd Jonker on Codev $OS = 'UNIX'; } elsif ($OS=~/Win/i) { $OS = 'WINDOWS'; } elsif ($OS=~/vms/i) { $OS = 'VMS'; } elsif ($OS=~/bsdos/i) { $OS = 'UNIX'; } elsif ($OS=~/dos/i) { $OS = 'DOS'; } elsif ($OS=~/^MacOS$/i) { # MacOS 9 or earlier $OS = 'MACINTOSH'; } elsif ($OS=~/os2/i) { $OS = 'OS2'; } else { $OS = 'UNIX'; } # variables that might need to be changed: # ================================================================== # %SCRIPTSUFFIX% : Suffix of TWiki Perl scripts (e.g. ".pl") : $scriptSuffix = ""; # Set ENV{'PATH'} explicitly for taint checks ( #!perl -T option ) : # (Note: PATH environment variable is not changed if set to "") # $safeEnvPath - safe operating system PATH setting for use by TWiki scripts. # # ---- Check notes for your operating system and use appropriate line as model # ---- Comment out unused lines (put '#' at start) and uncomment required line. # ---- All Windows paths use '/' not '\' for simplicity. # # As long as you use full pathnames for $egrepCmd and similar (below), # this path value is used only to find a shell (or cmd.exe) and by RCS programs # to find 'diff'. # # >> Unix or Linux - ensure 'diff' and shell (Bourne or bash type) is found on # this path. # Separator is ':' $safeEnvPath = "/bin:/usr/bin"; # Unix/Linux # >> Windows: Cygwin Perl and RCS - ensure 'diff' and 'bash' found on this path. # Same format as Unix PATH, separator is ':' not ';'. You must NOT use # 'c:/foo' type paths, because ':' is taken as separator, meaning that # 'c' is interpreted as a relative pathname, giving Perl 'Insecure # directory in $ENV{PATH}' error on using 'Diffs' link. # Separator is ':' # $safeEnvPath = "/bin"; # Cygwin - uncomment, no need to customise # >> Windows: ActiveState Perl, with Cygwin RCS and PERL5SHELL set to # 'c:/cygwin/bin/bash.exe -c'. Same format as the normal Windows PATH, # separator is ':' not ';'. It's best to avoid 'c:/foo' type paths, # because in some cases these can cause a Perl 'Insecure directory # in $ENV{PATH}' error on using 'Diffs' link. Since this setting is # for Cygwin RCS, the best alternative is to convert 'c:/foo' to # '/c/cygdrive/foo' - odd looking but it works! The Windows system directory # (e.g. /cygdrive/c/winnt/system32) is required in this path for commands # using pipes to work (e.g. using the 'Index' link). # NOTE: Customise this path based on your Cygwin and Windows directories # Separator is ';' # $safeEnvPath = "/cygdrive/c/YOURCYGWINDIR/bin;/cygdrive/c/YOURWINDOWSDIR/system32"; # >> Windows: ActiveState Perl, with non-Cygwin RCS, OR no PERL5SHELL setting. # Windows PATH, separator is ';'. The Windows system directory # (e.g. c:\winnt\system32) is required in this path for commands using pipes # to work (e.g. using the 'Index' link). Must NOT use '/' in pathnames # as this upsets cmd.exe - single '\' is OK using Perl single-quoted string. # FIXME: needs testing, not currently recommended. # NOTE: Customise this path based on your RCS and Windows directories # Separator is ';' # $safeEnvPath = 'c:\YOUR_RCSPROGDIR\bin;c:\YOURWINDOWSDIR\system32'; # Mail program used in case Net::SMTP is not installed. # See also SMTPMAILHOST in TWikiPreferences. # Windows: this setting is ignored, just use Net::SMTP. $mailProgram = "/usr/sbin/sendmail -t -oi -oeq"; # Prevent spambots from grabbing addresses, default "": # e.g. set to "NOSPAM" to get "user@somewhereNOSPAM.com" $noSpamPadding = ""; # Pathname of mime types file that maps file suffixes to MIME types : # For Apache server set this to Apache's mime.types file pathname. # Default "$dataDir/mime.types" $mimeTypesFilename = "$dataDir/mime.types"; # RCS directory (find out by 'which rcs') : $rcsDir = '/usr/bin'; # Unix, Linux and Cygwin # Initialise RCS file, ignored if empty string, # needed on Windows for binary files. Added JET 22-Feb-01 $rcsArg = ""; $rcsArg = "-x,v" if( $OS eq "WINDOWS" ); # null device /dev/null for unix, NUL for windows $nullDev = { UNIX=>'/dev/null', OS2=>'', WINDOWS=>'NUL', DOS=>'NUL', MACINTOSH=>'', VMS=>'' }->{$OS}; # Store RCS history files in directory (RCS under content dir), default "0" # Don't change this in a working installation, only change when initially setting up a TWiki installation # You also need to create an RCS directory for each Web. TWiki will create RCS directories under pub for attachments historys. $useRcsDir = "0"; # This should enable gathering of extra error information on most OSes. However, won't work on NT4 unless unix like shell is used $endRcsCmd = ""; $endRcsCmd = " 2>&1" if( $OS eq "UNIX" ); # Command quote ' for unix, \" for Windows $cmdQuote = "'"; $cmdQuote = "\"" if( $OS eq "WINDOWS" ); # Choice and configuration of Storage implementation # Currently select either: # RcsWrap - use RCS executables, see TWiki::Store::RcsWrap.pm for explanation of storeSettings # RcsLite - use a 100% Perl simplified implementation of Perl (NOT yet ready for production use) $storeTopicImpl = "RcsWrap"; #$storeTopicImpl = "RcsLite"; # NOTE: You might want to avoid c: at start of cygwin unix command for # Windows, seems to cause a problem with pipe used in search # Unix ls command : $lsCmd = "/bin/ls"; # Unix egrep command : $egrepCmd = "/bin/egrep"; # Unix fgrep command : $fgrepCmd = "/bin/fgrep"; # internationalisation setup: # ================================================================== # See the output of the 'testenv' script for help with these settings. # Set $useLocale to 1 to enable internationalisation support for # 8-bit character sets $useLocale = 0; # Site-wide locale - used by TWiki and external programs such as grep, # and to specify the character set for the user's web browser. The # language part also prevents English plural handling for non-English # languages. Ignored if $useLocale is 0. # # Locale names are not standardised - check 'locale -a' on your system to # see what's installed, and check this works using command line tools. You # may also need to check what charsets your browsers accept - the # 'preferred MIME names' at http://www.iana.org/assignments/character-sets # are a good starting point. # # WARNING: Topics are stored in site locale format, so data conversion of # file names and contents will be needed if you change locales after # creating topics whose names or contents include 8-bit characters. # $siteLocale = "en_US.ISO-8859-1"; # Examples only: (choose suitable locale + charset for your own site) # $siteLocale = "de_AT.ISO-8859-15"; # Austria with ISO-8859-15 for Euro # $siteLocale = "ru_RU.KOI8-R"; # Russia # Set $localeRegexes to 0 to force explicit listing of national chars in # regexes, rather than relying on locale-based regexes. Intended for Perl # 5.6 or higher on platforms with broken locales, should only be set if # required due to locale problems with Perl 5.6 or higher. $localeRegexes = 1; # If a suitable working locale is not available (i.e. $useLocale is 0), OR # you are using Perl 5.005 (with or without working locales), OR # $localeRegexes is 0, you can use WikiWords with accented national # characters by putting any '8-bit' accented national characters within # these strings - i.e. $upperNational should contain upper case non-ASCII # letters. This is termed 'non-locale regexes' mode. # # If 'non-locale regexes' is in effect, WikiWord linking will work, but # some features such as sorting of WikiWords in search results may not. # These features depend on $useLocale, which can be set independently of # $localeRegexes, so they will work with Perl 5.005 as long as # $useLocale is set to 1 and you have working locales. # # Using the recommended setup of Perl 5.6.1 with working locales avoids the # need to set these parameters. $upperNational = ''; # Upper case $lowerNational = ''; # Lower case # variables that probably do not change: # ================================================================== # RCS keyword handling: change this to '' only if you want TWiki pages to # include automatically-updated RCS ID keyword strings. Leave this as # '-ko' if you don't know what that means! Default setting ensures that # contents of TWiki pages are not changed by RCS. RcsLite always works in # '-ko' mode. $keywordMode = '-ko'; # Settings for Rcs (standard RCS programs) and RcsLite (built-in) @storeSettings = ( # RcsLite and Rcs dataDir => $TWiki::dataDir, pubDir => $TWiki::pubDir, attachAsciiPath => "\.(txt|html|xml|pl)\$", dirPermission => 0775, # Rcs only initBinaryCmd => "$rcsDir/rcs $rcsArg -q -i -t-none -kb %FILENAME% $endRcsCmd", tmpBinaryCmd => "$rcsDir/rcs $rcsArg -q -kb %FILENAME% $endRcsCmd", ciCmd => "$rcsDir/ci $rcsArg -q -l -m$cmdQuote%COMMENT%$cmdQuote -t-none -w$cmdQuote%USERNAME%$cmdQuote %FILENAME% $endRcsCmd", coCmd => "$rcsDir/co $rcsArg -q -p%REVISION% $keywordMode %FILENAME% $endRcsCmd", histCmd => "$rcsDir/rlog $rcsArg -h %FILENAME% $endRcsCmd", infoCmd => "$rcsDir/rlog $rcsArg -r%REVISION% %FILENAME% $endRcsCmd", diffCmd => "$rcsDir/rcsdiff $rcsArg -q -w -B -r%REVISION1% -r%REVISION2% $keywordMode %FILENAME% $endRcsCmd", breakLockCmd => "$rcsDir/rcs $rcsArg -q -l -M %FILENAME% $endRcsCmd", ciDateCmd => "$rcsDir/ci -l $rcsArg -q -mnone -t-none -d$cmdQuote%DATE%$cmdQuote -w$cmdQuote%USERNAME%$cmdQuote %FILENAME% $endRcsCmd", delRevCmd => "$rcsDir/rcs $rcsArg -q -o%REVISION% %FILENAME% $endRcsCmd", unlockCmd => "$rcsDir/rcs $rcsArg -q -u %FILENAME% $endRcsCmd", lockCmd => "$rcsDir/rcs $rcsArg -q -l %FILENAME% $endRcsCmd", ); # Regex security filter for web name, topic name, user name : $securityFilter = "[\\\*\?\~\^\$\@\%\`\"\'\&\;\|\<\>\x00-\x1F]"; # Regex security filter for uploaded files : # (Matching files will have a ".txt" appended) $uploadFilter = "^(\.htaccess|.*\.php[0-9s]?|.*\.phtm[l]?)\$"; # Default user name, default "guest" : $defaultUserName = "guest"; # Deprecated, replaced by %WIKITOOLNAME% preferences variable : $wikiToolName = "TWiki"; # Deprecated, here for compatibility : $wikiHomeUrl = "http://your.domain.com/twiki"; # Site Web.Topic name, e.g. "Main.TokyoOffice". Default "" : $siteWebTopicName = ""; # %MAINWEB% : Name of Main web, default "Main" : $mainWebname = "Main"; # %TWIKIWEB% : Name of TWiki system web, default "TWiki" : $twikiWebname = "TWiki"; # Pathname of debug file : $debugFilename = "$logDir/debug.txt"; # Pathname of warning file. Default "$logDir/warning.txt" : # (no warnings are written if empty) $warningFilename = "$logDir/warning.txt"; # Pathname of user name/password file for authentication : $htpasswdFilename = "$dataDir/.htpasswd"; # Pathname of log file : $logFilename = "$logDir/log%DATE%.txt"; # Pathname of remote users file that maps IP to user : $remoteUserFilename = "$dataDir/remoteusers.txt"; # %WIKIUSERSTOPIC% : Name of users list topic : $wikiUsersTopicname = "TWikiUsers"; # Pathname of WebUsers topic, used to translate Intranet name # (e.g. 'fsmith') to Wiki name (e.g. 'FredSmith') : $userListFilename = "$dataDir/$mainWebname/$wikiUsersTopicname.txt"; # %HOMETOPIC% : Name of main topic in a web, default "WebHome" : $mainTopicname = "WebHome"; # %NOTIFYTOPIC% : Name of topic for email notifications, default "WebNotify" : $notifyTopicname = "WebNotify"; # %WIKIPREFSTOPIC% : Name of site-level preferences topic, default "TWikiPreferences" : $wikiPrefsTopicname = "TWikiPreferences"; # %WEBPREFSTOPIC% : Name of preferences topic in a web, default "WebPreferences" : $webPrefsTopicname = "WebPreferences"; # %STATISTICSTOPIC% : Name of statistics topic, default "WebStatistics" : $statisticsTopicname = "WebStatistics"; # Number of top viewed topics to show in statistics topic, default "10" : $statsTopViews = "10"; # Number of top contributors to show in statistics topic, default "10" : $statsTopContrib = "10"; # Statistics debugging - write invalid logfile lines to debug log $doDebugStatistics = "0"; # Show how many revision links, "0" for all, default "3" : $numberOfRevisions = "3"; # Number of seconds a topic is locked during edit, default "3600" : $editLockTime = "3600"; # Group of users that can use cmd=repRev # or that ALWAYS have edit powers (set $doSuperAdminGroup=1) $superAdminGroup = "TWikiAdminGroup"; # flag variables that could change: # ================================================================== # values are "0" for no, or "1" for yes # Keep same revision if topic is saved again within edit lock time. Default "1" $doKeepRevIfEditLock = "1"; # Build $scriptUrlPath from $query->url parameter. Default "0". # Note that links are incorrect after failed authentication if "1" $doGetScriptUrlFromCgi = "0"; # Remove port number from URL. Default "0" $doRemovePortNumber = "0"; # Remove IMG tags in mailnotify. Default "1" $doRemoveImgInMailnotify = "1"; # Remember remote user by matching the IP address # in case REMOTE_USER is empty. Default "0" # (Note: Does not work reliably with dynamic IP addresses) $doRememberRemoteUser = "0"; # Change non existing plural topic name to singular, # e.g. TestPolicies to TestPolicy. Default "1" $doPluralToSingular = "1"; # Hide password in registration email $doHidePasswdInRegistration = "1"; # Remove ".." from %INCLUDE{""}% filename, to # prevent includes of "../../file". Default "1" $doSecureInclude = "1"; # Log topic views to $logFilename. Default "1" $doLogTopicView = "1"; # Log topic edits to $logFilename. Default "1" $doLogTopicEdit = "1"; # Log topic saves to $logFilename. Default "1" $doLogTopicSave = "1"; # Log renames to $logFilename. Default "1". Added JET 22-Feb-01 $doLogRename = "1"; # Log view attach to $logFilename. Default "1" $doLogTopicAttach = "1"; # Log file upload to $logFilename. Default "1" $doLogTopicUpload = "1"; # Log topic rdiffs to $logFilename. Default "1" $doLogTopicRdiff = "1"; # Log changes to $logFilename. Default "1" $doLogTopicChanges = "1"; # Log search to $logFilename. Default "1" $doLogTopicSearch = "1"; # Log user registration to $logFilename. Default "1" $doLogRegistration = "1"; # Disable plugins. Set to "1" in case TWiki is non functional after # installing a new plugin. This allows you to remove the plugin from # the ACTIVEPLUGINS list in TWikiPreferences. Default "0" $disableAllPlugins = "0"; # Enable super-powers to $superAdminGroup members # see Codev.UnchangeableTopicBug $doSuperAdminGroup = "1"; ############################################################# ########## Administration notes ################## ############################################################# # # Don't forget to customize also the TWiki.TWikiPreferences topic. # # You can alter the most recent revision of a topic using /edit/web/topic?cmd=repRev # - use only as a last resort, as history is altered # - you must be in TWikiAdminGroup # - you will be presented with normal edit box, but this will also include meta # information, modify this with extreme care # # You can delete the most recent revision of a topic using /edit/web/topic?cmd=delRev # - use only as a last resort, as history is lost # - you must be in TWikiAdminGroup # - fill in some dummy text in the edit box # - ignore preview output # - when you press save last revision will be deleted #