手册:配置设置

本頁使用了標題或全文手工轉換
From mediawiki.org
This page is a translated version of the page Manual:Configuration settings and the translation is 69% complete.
Outdated translations are marked like this.

这是一个所有基于MainConfigSchema.php文件的支持配置设置的索引。

千万不要编辑MainConfigSchema.php;而是将适当的某些行复制到LocalSettings.php ,并酌情改善。

如果在这里找不到某一配置项,你可以看看是否有在DefaultSettings.php中定义。 那里应该會给变量一些说明。

在MediaWiki 1.35版之前移除的设置项不再列在此处。 请使用搜索框來尋找手冊相關的頁面(例如Manual:$wgAllowAnonymousMinor)。
按字母顺序排序 | 按功能排序 | 分类:MediaWiki配置设置

通用的设置

全局的对象

服务器的URL及文件的路徑

另见文件/图像上传路径的设置

另见皮肤路径的设置

文件及文件上传

上传必须经过特别设置,才能保证安全。

共享的上传

这些设置是为了向后兼容而保留的,新的设置见$wgForeignFileRepos ,若是你只需要对維基共享資源上的图像进行读取访问,则见$wgUseInstantCommons

MIME类型

警告 警告: ↑这不是一个配置设置,而是一个全局状态变量。 它应该只由thumb.php 来使用!

另见: Manual:MIME type detection

图片

另见: 手册:配置文件上传

DjVu

EXIF

  • $wgShowEXIF Show EXIF data at the end of file description pages.
  • $wgUpdateCompatibleMetadata Whether to automatically update the img_metadata field if it is outdated but compatible with the current version.

ImageMagick

SVG

缩略图设置

杀毒

邮件的设置

請參見用户访问: $wgEmailConfirmToEdit

电子邮件通知(Enotif)设置

每个用户的实际通知是在选项中定义。 您可以用$wgDefaultUserOptions 更改默认值。

数据库的设置

负载均衡器的设置

MySQL特定配置

PostgreSQL特定配置

  • $wgDBport – 数据库端口。只用于PostgreSQL。

SQLite特定配置

共享数据库设置

扩展字段

  • $wgExtPGNewFields (在版本1.36移除)Extension defined fields to be added to existing tables
  • $wgExtNewTables (在版本1.36移除)Extension Defined tables to be added on schema change
  • $wgExtNewFields (在版本1.36移除) – 定义添加到现有表格字段的扩展
  • $wgExtNewIndexes (在版本1.36移除)Extension defined indexes to be added to existing tables
  • $wgExtPGAlteredFields (在版本1.36移除)Extension defined columns to be altered in tables
  • $wgExtModifiedFields (在版本1.36移除)Extension defined fields to change existing tables

内容处理器和存储

性能技巧和限制

缓存

主页面: Manual:Caching
有关跨wiki的缓存设置,请参阅:Interwiki

文件缓存

服务器端文件缓存的设置。

消息缓存

侧边栏缓存

解析器缓存

Memcached 设置

配置 Memcached 基于内存的对象存储的设置(如果您正在使用它的话),docs/memcached.md 可以获取更多详细信息。

WAN缓存

HTTP 代理 (CDN) 设置

这些设置在使用带有缓存的HTTP 代理服务器时配置MediaWiki。 它们适用于使用 caching using VarnishSquid的情况下进行缓存。

  • $wgCdnMatchParameterOrder Indicates if should take query parameters order on incoming requests into account for CDN caching
  • $wgCdnMaxageLagged Cache timeout for the CDN when DB replica lag is high
  • $wgCdnMaxageStale Cache timeout in seconds when delivering a stale ParserCache response due to PoolCounter contention.
  • $wgCdnMaxageSubstitute Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
  • $wgCdnMaxAge Cache TTL for the CDN sent as s-maxage (without ESI) or Surrogate-Control (with ESI).
  • $wgCdnReboundPurgeDelay Secondary delayed purges of URLs
  • $wgCdnServersNoPurge Same as $wgCdnServers , except no HTTP purges will be sent and CIDR ranges are accepted
  • $wgCdnServers – 一组“单独的”代理服务器,以帮助 MediaWiki 检测请求是否已被代理。
    还要在更改时发送回代理 PURGE 命令。
  • $wgForcedRawSMaxage – 原始 CSS/JavaScript 访问的默认最长期限(以秒为单位)。
  • $wgInternalServer – Squid已知的内部服务器名称(如果不同于$wgServer )。
  • $wgLoggedOutMaxAge (在版本1.38移除) – 对于已登出用户,以最大寿命发送的用户代理缓存TTL。
  • $wgSquidMaxage (在版本1.35移除)Cache timeout for the squid.
  • $wgSquidPurgeUseHostHeader (在版本1.42移除)Whether to use a Host header in purge requests sent to the proxy servers configured in $wgSquidServers.
  • $wgSquidServersNoPurge (在版本1.35移除)Same as $wgSquidServers , except that MW has no methods to send HTTP PURGE to an origin part of the configured ranges
  • $wgSquidServers (在版本1.35移除)An array of individual proxy servers to help MediaWiki detect if the request has been proxied.
    But also to send back to the proxy PURGE commands on changes.
  • $wgUseCdn – 启用/禁用页面视图缓存。
  • $wgUseESI (在1.33版本中已弃用)If you run Squid3 with ESI support, enable this.
  • $wgUsePrivateIPs – 是否接受内网X转发IP
  • $wgUseSquid (在版本1.35移除) – 启用/禁用Squid。
  • $wgVaryOnXFP Whether to add X-Forwarded-Proto to the Vary header for API requests and RSS/Atom feeds.

HTCP 组播清理

语言、区域和字符编码设置

时区设置

特定语言的配置

英语
  • $wgAmericanDates Use 'mdy' instead of 'dmy' as the default date format, e.g. 'May 12' instead of '12 May'.
阿拉伯语/印地语
  • $wgTranslateNumerals For Hindi, Arabic, and other languages with their own numeral systems, use local numerals instead of Western style (0-9) numerals in some areas of the interface.

输出格式和皮肤设置

输出

皮肤

资源加载器

参见资源加载器 以获取更多信息。

页面标题及重定向

命名空间

移动端支持

跨wiki的链接和站点

跨维基缓存

更多信息另见interwiki cache

Parser

HTML

  • $wgRawHtml – 允许未经检查的原始HTML放在‎<html>...‎</html>里。
  • $wgTidyConfig Configuration of the HTML postprocessing tool to use for fixing invalid HTML code.

统计和内容分析

  • $wgActiveUserDays – 在一段时间中有编辑的用户将被视为活跃用户。
  • $wgArticleCountMethod – 方法用于确定内容名称空间中的页是否应算作有效的內容頁面(條目)。
  • $wgDisableCounters (在版本1.35移除) – 禁用页面预览次数计数器。
  • $wgExperiencedUserEdits Determines the number of edits needed to qualify at the "Experienced user" level.
  • $wgExperiencedUserMemberSince Determines the number of days needed since account creation to qualify at the "Experienced user" level.
  • $wgLearnerEdits Determines the number of edits needed to qualify at the "Learner" experience level.
  • $wgLearnerMemberSince Determines the number of days needed since account creation to qualify at the "Learner" experience level.
  • $wgManualRevertSearchRadius Maximum number of revisions of a page that will be checked against every new edit made to determine whether the edit was a manual revert.
  • $wgRevertedTagMaxDepth Maximum depth (revision count) of reverts that will have their reverted edits marked with the mw-reverted change tag.

用户账户、身份验证

身份验证

用户权限、访问控制和监视

访问

Blocking/banning, and some other related settings.

See 手册:阻止访问 for more methods and settings concerning access. See also 手册:用户权限 for more information about $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups, etc.

See User Access for User Access settings.

Security

Cookies

Profiling, testing and debugging

Debug

See also: 手册:如何调试

Profiling

搜索

Edit user interface

Maintenance Scripts setting

Recent changes, new pages, watchlist and history

Feed

  • $wgFeed Toggle syndication feeds (RSS, Atom e.g. Recentchanges, Newpages) on and off.
  • $wgAdvertisedFeedTypes Feed types that should be provided by default.
  • $wgFeedCacheTimeout Minimum timeout for cached Recentchanges feed, in seconds.
  • $wgFeedClasses Available feeds objects.
  • $wgFeedDiffCutoff When generating Recentchanges RSS/Atom feed, diffs will not be generated for pages larger than this size.
  • $wgFeedLimit Set maximum number of results to return in syndication feeds (RSS, Atom) for e.g. Recentchanges, Newpages.
  • $wgOverrideSiteFeed Override the site's default rss/atom feed that appears on every page.


版权

Import/Export

Extensions

Category

Logging

Special pages

Actions

  • $wgActions – 正常页面的“action”参数的允许值的数组。正常页面的“action”参数的允许值的数组。

Robot policies

Ajax, Action API and REST API

Ajax

API

The time allocated for running scripts has expired.

Shell and process control

The time allocated for running scripts has expired.

HTTP client

The time allocated for running scripts has expired.

Jobs

The time allocated for running scripts has expired.

Wiki farm

The time allocated for running scripts has expired. The time allocated for running scripts has expired.

Miscellaneous settings

參見