From: Paul Hänsch Date: Tue, 27 Feb 2024 22:52:27 +0000 (+0100) Subject: Compendious explanation of all config variables X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=2488d0170e5fe5155dbbfa90a38f53d22085fb89;p=shellwiki Compendious explanation of all config variables --- diff --git a/config.sh.example b/config.sh.example new file mode 100644 index 0000000..9edf811 --- /dev/null +++ b/config.sh.example @@ -0,0 +1,211 @@ +#!/bin/sh + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ShellWiki is configured via Environment variables. The environment should +# usually be set in you webserver configuration. +# While this file explains possible environment setting its syntax is that of +# a shell script, and is likely different from the configuration file format +# used by your webserver. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# General `cgilite` settings +# ========================== + +# The directory containing the ShellWiki installation. +# +# _EXEC=/opt/shellwiki +# +# If unset, shellwiki's `index.cgi` will try to determine this path from its +# argv[0] parameter. Since this is unreliable, you should set it correctly. + +# The directory containing site data. +# +# _DATA=/srv/sitedata +# +# Each site served by the installation must have its own data directory. +# If unset it will default to the working directory at startup, which is +# likely your www root. I strongly recommend to set this path to somewhere +# outside your www root. + +# The local part of the URL from which Shellwiki is served. +# +# _BASE= +# +# It is possible to serve Shellwiki on a subpage of you domain, e.g. +# http://example.com/apps/wiki where "/apps/wiki" would be the base directory. +# I recommend against doing this as it will be confusing when setting links +# within the wiki. If unsure leave empty! + +# Dump the environment to stderr at script startup +# +# DEBUG=anything +# +# Leave empty if unsure. + +# User authetication and registration +# ----------------------------------- +# The following settings are used by the "default" auth module which is +# provided by `cgilite`. Settings may vary when using other authenticators. + +# The sendmail binary +# +# SENDMAIL=sendmail +# +# The default setting will find `sendmail` within your shells standard +# execution PATH. However, some systems may put sendmail into +# `/usr/lib/sendmail` or require you to set up your own mail wrapper +# manually. + +# Allow user registration +# +# USER_REGISTRATION=true +# +# Note that the first user will always be able to register, regardless of +# this setting. + +# Require users to enter and confirm an email address when registering +# +# USER_REQUIREEMAIL=true + +# Landing page after succesful registration +# +# USER_ACCOUNTPAGE= +# +# It's safe to leave this empty. + +# Expire user accounts after this much inactivity +# +# USER_ACCOUNTEXPIRE=$((86400 * 730)) +# +# Value must be given in seconds and cannot be omitted. The default is +# ~ two years. Set this to a very high value, if you don't want accounts to +# expire unexpectedly. + +# Expire unanswered user confirmations +# +# USER_CONFIRMEXPIRE=86400 +# +# Value must be given in seconds. This value also sets the validity of +# invitation links. The default is 24 hours. It is not recommended to set +# this to more than a week. + +# Sender address of registration emails +# +# MAILFROM=noreply@http_host +# +# If unset shellwiki will try to detrmine the domain part of the mail +# automatically using the HTTP Host header field. It is much safer to set +# this variable manually. + +# User Database file +# +# user_db=$_DATA/users.db +# +# Unless you want to share a user database with other cgilite apps you +# should leave this as it is. + + +# General Wiki Settings +# ===================== + +# Enable page revisioning +# +# REV_PAGES=true +# +# Only valid if `git` is available. + +# Whether to enable revisioning of attachments +# +# REV_ATTACHMENTS=false +# +# Off by default. Requires page rvisioning to be enabled. + +# Presentation theme of the wiki +# +# WIKI_THEME=default +# +# Themes can be found in the "themes/" folder. However most stying does not +# require to change the wiki theme. + +# Enable page index and search +# +# SEARCH_INDEX=true +# +# Enables auto indexing of pages, which is requred for using the "/[search]" +# page and <> macro. On by default. + +# Authentication Plugin +# +# USER_AUTH=default +# +# Authenticators can be found in the "auth/" folder. + +# Enable multi language functionality +# +# LANGUAGE_DEFAULT= +# +# This should be set to a key for your default language. Values are arbitrary +# but ISO-639 two letter codes are recommended to use the translated system +# pages of the default installation. E.g.: en, de, fr, it, ... +# If this option is enabled, page names starting with a colon (":") will +# obtain a special meaning as translations of their parent pages. + +# Site Title +# +# SITE_TITLE= +# +# A title string added to the attribute for each page. + +# Page Caching +# +# CACHE_AGE=300 +# +# Page cache expiry in seconds. ShellWiki will avoid rerendering a page within +# this time frame. Long cache retention may decrease overall server load and +# response times, but page macros like <<pagelist>> or <<include>> may not +# display current data. It is recommended to set this to a low value (e.g. 10 +# seconds) rather than disabling it alltogether. + +# Allow plain HTML code in markdown syntax +# +# MD_HTML=false +# +# While the original markdown specification allows plain HTML code to occur +# in markdown documents, it is strongly recommended to leave this disabled +# for security reasons. Enable it only if access in your wiki is restricted +# and all authors are fully trustworthy. + +# Access Control Settings +# ----------------------- + +# Override page ACLs +# +# ACL_OVERRIDE= +# +# ACLs that will be processed _before_ processing any page ACLs. Use this +# to grant universal access to a page adminitrator. +# The string may contain line breaks to permit multiple ACL lines. + +# Set default ACLs (Note the line break!) +# +# ACL_DEFAULT="Known:read,write +All:read" +# +# ACLs that will be processed _after_ processing any page ACLs. By default, +# unless overridde by page ACLs or ACL_OVERRIDE, all registered users can +# edit a page, and all anonymous users can only read. +# This does not prevent a page author from e.g. granting write access to +# outsiders since page ACLs take precedence over this setting. + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# If you have choosen to ignore the initial recommendation of setting the +# environment in your webserver configuration, and if you have used this +# shellscript as a configuration template instead, you should, as a final +# step, source the `index.sh` file. This way the configuration script will +# serve as a wrapper and should be set as the page handler / scritp alias. +# +# Or you may omit the final line and simple source this config script before +# starting the cgi application. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# . "$_EXEC/index.sh"