| |
| devel:config [2023/08/28 13:51] – создано vladpolskiy | devel:config [Дата неизвестна] (текущий) – удалено - внешнее изменение (Дата неизвестна) 127.0.0.1 |
|---|
| ====== Configuring DokuWiki ====== | |
| |
| DokuWiki can be configured depending on your needs by "system" options, configuration files for tuning behaviour, styling of the theme and dis/enabling extensions. | |
| |
| ===== What can be configured ===== | |
| |
| The "system" options of DokuWiki can be set in the [[plugin:config|{{https://raw.githubusercontent.com/dokuwiki/dokuwiki/master/lib/plugins/config/admin.svg?14}}]][[plugin:config|Configuration Manager]]. You need to login as superuser and click the Admin button to start it. The "default" values of the system are read from ''conf/dokuwiki.php'' file. To customize it, you can make changes in the Configuration Manager, which saves the changes to the file ''conf/local.php''. Alternatively, you edit it yourself or create it if it doesn't exist. To find what you can configure within that file, see the list of [[#available options]] below. | |
| |
| User names, (encrypted) passwords and Access Control rules are stored in the [[acl|users.auth.php and acl.auth.php]] files which can be found in the ''conf/'' directory. These can be edited via the [[plugin:usermanager|{{https://raw.githubusercontent.com/dokuwiki/dokuwiki/master/lib/plugins/usermanager/admin.svg?14}}]][[plugin:usermanager|User Manager]] and the [[plugin:acl|{{https://raw.githubusercontent.com/dokuwiki/dokuwiki/master/lib/plugins/acl/admin.svg?14}}]][[plugin:acl|Access Control List Management]]. | |
| |
| When uploading a new file within the mediamanager, you may encounter a ''"Upload denied. This file extension is forbidden!"'' message. This behavior is controlled within the ''conf/mime.conf'' file. To upload a new type of file, specify it within the [[mime|mime.local.conf]] file. | |
| |
| Some automatic replacements are done when you edit your pages. Some generate tooltips, smileys or some special chars. This behavior is controlled by the [[abbreviations|acronyms.conf]], [[smileys|smileys.conf]] or [[entities|entities.conf]]. | |
| |
| |
| ===== Configuration files ===== | |
| |
| All configuration files are to be found in the ''conf/'' folder in your installation (or ''/etc/dokuwiki'' when installed from a Debian package). | |
| |
| "Main files" usually ship with DokuWiki, whereas "local files" have to be created by the wiki admin. | |
| |
| If local files are supported you should use them instead of modifying the main files to avoid upgrade troubles. | |
| |
| Alternatively, instead of editing the ''*.conf'' files directly, you can install and use the [[plugin:confmanager|{{https://raw.githubusercontent.com/cosmocode/confmanager/master/admin.svg?16}}]][[plugin:confmanager|Configuration File Manager]]. | |
| |
| ^ main file ^ local file ^ type of config ^ quick info ^ | |
| | ''dokuwiki.php'' | ''local.php''\\ ''local.protected.php'' | see below | general wiki configuration | | |
| | ''acronyms.conf'' | ''acronyms.local.conf'' | [[abbreviations]] | automatic abbreviation hints | | |
| | ''entities.conf'' | ''entities.local.conf'' | [[entities]] | automatic text replacements | | |
| | ''interwiki.conf'' | ''interwiki.local.conf'' | [[interwiki]] | interwiki shortcut links | | |
| | ''mime.conf'' | ''mime.local.conf'' | [[mime]] | mime type settings for uploads | | |
| | ''smileys.conf'' | ''smileys.local.conf'' | [[smileys]] | image replacements | | |
| | | ''acl.auth.php'' | see [[acl]] | Access Control settings | | |
| | | ''users.auth.php'' | see [[acl]] | Users and passwords | | |
| | ''license.php'' | ''license.local.php'' | [[~:license]] | list of available licenses | | |
| | ''scheme.conf'' | ''scheme.local.conf'' | [[urlschemes]] | URL schemes to be recognized as links | | |
| | ''mediameta.php'' | ''mediameta.local.php'' | [[exif]] | Metadata editable for images | | |
| | ''wordblock.conf'' | ''wordblock.local.conf'' | [[blacklist]] | Spam blacklist | | |
| | ''plugins.required.php'' | ''plugins.local.php''\\ ''plugins.protected.php'' | see below | Enabling/disabling plugins | | |
| | ''manifest.json'' | ''manifest.local.json'' | [[devel:manifest]] | PWA Manifest | | |
| | ''lib/tpl/<tpl>/style.ini'' | ''conf/tpl/<tpl>/style.ini'' | [[devel:style.ini]] | Style files and variables | | |
| | | ''userscript.js'' | [[devel:javascript]] | Custom JavaScript enhancements | | |
| | | ''userstyle.css'' | [[devel:css]] | Custom CSS enhancements | | |
| |
| |
| ==== Theme configuration files ==== | |
| |
| The configuration file ''[[devel:style.ini]]'' for changing the theme is found in ''/lib/tpl/dokuwiki'' (for the default dokuwiki theme). Style.ini is a text-file that is read by the theme, and the user can configure e.g. the background-color. The [[plugin:styling|{{https://raw.githubusercontent.com/dokuwiki/dokuwiki/master/lib/plugins/styling/admin.svg?14}}]][[plugin:styling|Styling Plugin]] let you via the Admin interface preview and change the appearance of any template and store in ''conf/tpl/<tpl>/style.ini''. | |
| |
| ===== Enabling/disabling plugins ===== | |
| |
| Installed plugins are enabled by default. They could be disabled using the [[plugin:extension|{{https://raw.githubusercontent.com/dokuwiki/dokuwiki/master/lib/plugins/extension/admin.svg?14}}]][[plugin:extension|Extension Manager]] which writes to the ''plugins.local.php'' file. You can protect certain plugins by placing them in ''conf/plugins.protected.php''. | |
| |
| By default DokuWiki loads its configuration files in the following order: | |
| |
| - ''conf/plugins.php'' -- default plugins | |
| - ''conf/plugins.local.php'' -- changed by the extension manager | |
| - ''conf/plugins.required.php'' -- these core plugins cannot be controlled by the extension manager | |
| - ''conf/plugins.protected.php'' -- overrides setting in the other files | |
| |
| The loading order of configuration files is controlled by the global ''$config_cascade'' variable. By using a [[devel:preload|preload.php]] file you can change this behavior. | |
| |
| |
| ===== Configuration Options ===== | |
| |
| Most of [[DokuWiki]]'s features can be configured through various config options. The easiest way to modify these options is using the [[plugin:config|{{https://raw.githubusercontent.com/dokuwiki/dokuwiki/master/lib/plugins/config/admin.svg?14}}]][[plugin:config|Configuration Manager]]. | |
| |
| The available settings are listed below. Their default values are stored in a file called ''conf/dokuwiki.php''. If you want to modify a setting you should do this in a file called ''conf/local.php'' -- this makes sure your special configs are not overwritten by a later upgrade. The [[plugin:config|Config Manager]] will use this file as well. The file ''conf/local.protected.php'' can be used for configuration settings which cannot be modified in the Config Manager. | |
| |
| Here is a sample ''conf/local.php'': | |
| |
| <code php> | |
| <?php | |
| $conf['title'] = 'Admin\'s Wiki'; | |
| |
| $conf['useacl'] = 1; | |
| $conf['superuser'] = 'admin'; | |
| </code> | |
| |
| Some notes about the config file. The file is a piece of PHP code so the PHP syntax has to be preserved. E.g. each line has to have a semicolon at the end. There are multiple types of variables: | |
| |
| * **Number**s can be written as is. Example: ''9'' | |
| * **String**s have to be enclosed in single or double quotes. Example: ''%%'foo bar'%%'' | |
| * **Boolean**s can be either ''1'' or ''0'' | |
| * **Array**s contain multiple values of one of the above types | |
| |
| |
| ==== Available Options ==== | |
| |
| * **Basic Settings ** | |
| * [[~:title]] | |
| * [[~:startpage|start]] | |
| * [[~:lang]] | |
| * [[~:template]] | |
| * [[~:tagline]] | |
| * [[~:sidebar]] | |
| * [[~:license]] | |
| * [[~:savedir]] | |
| * [[~:basedir]] | |
| * [[~:baseurl]] | |
| * [[~:cookiedir]] | |
| * [[~:dmode]] | |
| * [[~:fmode]] | |
| * [[~:allowdebug]] | |
| * **Display Settings** | |
| * [[~:recent]] | |
| * [[~:recent_days]] | |
| * [[~:breadcrumbs]] | |
| * [[~:youarehere]] | |
| * [[~:fullpath]] | |
| * [[~:typography]] | |
| * [[~:dformat]] | |
| * [[~:signature]] | |
| * [[~:showuseras]] | |
| * [[~:toptoclevel]] | |
| * [[~:tocminheads]] | |
| * [[~:maxtoclevel]] | |
| * [[~:maxseclevel]] | |
| * [[~:camelcase]] | |
| * [[~:deaccent]] | |
| * [[~:useheading]] | |
| * [[~:sneaky_index]] | |
| * [[~:hidepages]] | |
| * **Authentication Settings** | |
| * [[~:useacl]] | |
| * [[~:autopasswd]] | |
| * [[~:authtype]] | |
| * [[~:passcrypt]] | |
| * [[~:defaultgroup]] | |
| * [[~:superuser]] | |
| * [[~:manager]] | |
| * [[~:profileconfirm]] | |
| * [[~:rememberme]] | |
| * [[~:disableactions]] | |
| * [[~:auth_security_timeout]] | |
| * [[~:securecookie]] | |
| * [[~:samesitecookie]] | |
| * [[~:remote]] | |
| * [[~:remoteuser]] | |
| * [[~:remotecors]] | |
| * ** Anti-Spam Settings ** | |
| * [[~:usewordblock]] | |
| * [[~:relnofollow]] | |
| * [[~:indexdelay]] | |
| * [[~:mailguard]] | |
| * [[~:iexssprotect]] | |
| * ** Editing Settings ** | |
| * [[~:usedraft]] | |
| * <del>[[~:htmlok]]</del> (removed since release 2023 Jack Jackrum) | |
| * <del>[[~:phpok]]</del> (removed since release 2023 Jack Jackrum) | |
| * [[~:locktime]] | |
| * [[~:cachetime]] | |
| * ** Link Settings ** | |
| * [[~:target|target (wiki, interwiki, extern, media, windows)]] | |
| * ** Media Settings ** | |
| * [[~:mediarevisions]] | |
| * [[~:gdlib]] | |
| * [[~:im_convert]] | |
| * [[~:jpg_quality]] | |
| * [[~:fetchsize]] | |
| * [[~:refcheck]] | |
| * ** Notification Settings ** | |
| * [[~:subscribers]] | |
| * [[~:subscribe_time]] | |
| * [[~:notify]] | |
| * [[~:registernotify]] | |
| * [[~:mailfrom]] | |
| * [[~:mailreturnpath]] | |
| * [[~:mailprefix]] | |
| * [[~:htmlmail]] | |
| * [[~:dontlog]] | |
| * ** Syndication Settings ** | |
| * [[~:sitemap]] | |
| * [[~:rss_type]] | |
| * [[~:rss_linkto]] | |
| * [[~:rss_content]] | |
| * [[~:rss_media]] | |
| * [[~:rss_update]] | |
| * [[~:rss_show_summary]] | |
| * [[~:rss_show_deleted]] | |
| * ** Advanced options ** | |
| * [[~:updatecheck]] | |
| * [[~:userewrite]] | |
| * [[~:useslash]] | |
| * [[~:sepchar]] | |
| * [[~:canonical]] | |
| * [[~:fnencode]] | |
| * [[~:autoplural]] | |
| * [[~:compress]] | |
| * [[~:cssdatauri]] | |
| * [[~:gzip_output]] | |
| * [[~:send404]] | |
| * [[~:compression]] | |
| * [[~:broken_iua]] | |
| * [[~:xsendfile]] | |
| * [[~:renderer_xhtml]] | |
| * [[~:readdircache]] | |
| * [[~:search_nslimit]] | |
| * [[~:search_fragment]] | |
| * ** Network Settings ** | |
| * [[~:dnslookups]] | |
| * [[~:jquerycdn]] | |
| * [[~:proxy|proxy (host, port, user, pass, ssl, except)]] | |
| * [[~:trustedproxy]] | |
| * <del>[[~:safemodehack]]</del> (removed since release 2020 [[:changes#release_2020-07-29a_hogfather|Hogfather]]) | |
| * <del>[[~:ftp|ftp (host, port, user, pass, root)]]</del> (removed since release 2020 Hogfather) | |
| * **Feature Flags** | |
| * [[~:defer_js]] | |