MediaWiki: Difference between revisions
imported>Nix m add Software/Applications subcategory |
imported>Alyaeanyx Added info about module |
||
Line 1: | Line 1: | ||
[https://www.mediawiki.org/wiki/MediaWiki MediaWiki] is available | [https://www.mediawiki.org/wiki/MediaWiki MediaWiki] is available as a [[Module|NixOS module]]. | ||
Sample configuration: | |||
<syntaxhighlight> | |||
services.mediawiki = { | |||
enable = true; | |||
name = "Sample MediaWiki instance"; | |||
virtualHost = { | |||
hostName = "example.com"; | |||
adminAddr = "admin@example.com"; | |||
}; | |||
passwordFile = "/var/mediawiki/passwordFile"; # put the initial password for the admin account here | |||
extraConfig = '' | |||
# Disable anonymous editing | |||
$wgGroupPermissions['*']['edit'] = false; | |||
''; | |||
https:// | extensions = { | ||
VisualEditor = pkgs.fetchzip { | |||
url = "https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_37-3aeea63.tar.gz"; | |||
sha256 = "sha256:0y7yysnm64vclyj0nh18ibsbrwsycdi7f8mf8j1b991qggqnclys"; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
By default, the <code>services.mediawiki</code> module creates a <code>services.httpd.virtualHost</code> which can be configured via the `services.mediawiki.virtualHost` submodule. If you are using another web server, you can configure MediaWiki for a reverse proxy with the <code>services.mediawiki.virtualHost.listen</code> option: | |||
<syntaxhighlight> | |||
services.mediawiki.virtualHost.listen = [ | |||
ip = "127.0.0.1"; | |||
port = 8080; | |||
ssl = false; | |||
} ]; | |||
</syntaxhighlight> | |||
[[Category:Guide]] | [[Category:Guide]] | ||
[[Category:Applications]] | [[Category:Applications]] |