MediaWiki: Difference between revisions
m
Category:Server Category:Web Applications
imported>Tamiyo No edit summary |
|||
(7 intermediate revisions by 4 users not shown) | |||
Line 7: | Line 7: | ||
services.mediawiki = { | services.mediawiki = { | ||
enable = true; | enable = true; | ||
name = "Sample MediaWiki | name = "Sample MediaWiki"; | ||
virtualHost = { | httpd.virtualHost = { | ||
hostName = "example.com"; | hostName = "example.com"; | ||
adminAddr = "admin@example.com"; | adminAddr = "admin@example.com"; | ||
}; | }; | ||
# Administrator account username is admin. | |||
# Set initial password to "cardbotnine" for the account admin. | |||
passwordFile = pkgs.writeText "password" "cardbotnine"; | |||
extraConfig = '' | extraConfig = '' | ||
# Disable anonymous editing | # Disable anonymous editing | ||
Line 33: | Line 35: | ||
== Web Server == | == Web Server == | ||
By default, the <code>services.mediawiki</code> module creates a <code>services.httpd.virtualHost</code> which can be configured via the <code>services.mediawiki.virtualHost</code> submodule. | By default, the <code>services.mediawiki</code> module creates a <code>services.httpd.virtualHost</code> which can be configured via the <code>services.mediawiki.httpd.virtualHost</code> submodule. | ||
If you are using another web server (like Nginx), you can configure MediaWiki for a reverse proxy with the <code>services.mediawiki.virtualHost.listen</code> option: | If you are using another web server (like Nginx), you can configure MediaWiki for a reverse proxy with the <code>services.mediawiki.virtualHost.listen</code> option: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.mediawiki.virtualHost.listen = [ | services.mediawiki.httpd.virtualHost.listen = [ | ||
{ | { | ||
ip = "127.0.0.1"; | ip = "127.0.0.1"; | ||
Line 46: | Line 48: | ||
]; | ]; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Alternatively, <code>services.mediawiki.webserver</code> can be set to <code>"nginx"</code> to use nginx instead of apache. | |||
== Troubleshooting == | == Troubleshooting == | ||
Line 60: | Line 64: | ||
== See Also == | == See Also == | ||
* [https://github.com/NixOS/nixos-wiki-infra Configuration of the NixOS wiki] | |||
* [https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/mediawiki.nix nixos/tests/mediawiki.nix] | * [https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/mediawiki.nix nixos/tests/mediawiki.nix] | ||
* [[Dokuwiki]], simple PHP- and web-based wiki software which uses file based storage for its content. | * [[Dokuwiki]], simple PHP- and web-based wiki software which uses file based storage for its content. | ||
* [[Outline]], a modern web based wiki and knowledge base for teams. | * [[Outline]], a modern web based wiki and knowledge base for teams. | ||
[[Category:Guide]] | [[Category:Guide]] | ||
[[Category:Server]] | |||
[[Category:Web Applications]] | [[Category:Web Applications]] |