Talk:MediaWiki: Difference between revisions
Latest comment: 26 May 2021 by Makefu
imported>Vater m Vater moved page Talk:Mediawiki to Talk:MediaWiki |
imported>Vater |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
I am somewhat struggling to get the whole setup running, there are just so many configuration options and it is not clear what actually needs to be done | I am somewhat struggling to get the whole setup running, there are just so many configuration options and it is not clear what actually needs to be done | ||
I was looking for a nixos container setup which gets requests forwarded from the host system but maybe it is enough to have mediawiki listen on the a port != 80 --[[User:Makefu|Makefu]] ([[User talk:Makefu|talk]]) 07:28, 26 May 2021 (UTC) | I was looking for a nixos container setup which gets requests forwarded from the host system but maybe it is enough to have mediawiki listen on the a port != 80 --[[User:Makefu|Makefu]] ([[User talk:Makefu|talk]]) 07:28, 26 May 2021 (UTC) | ||
== configuration examples == | |||
==== minimal configuration ==== | |||
: tested on NixOS 21.11 | |||
: with a working setup for networking | |||
---- | |||
: <syntaxhighlight lang="bash">touch /run/keys/mediawiki-password</syntaxhighlight> | |||
: <syntaxhighlight lang="bash">$EDITOR /run/keys/mediawiki-password</syntaxhighlight> | |||
: <syntaxhighlight lang="bash">cat /run/keys/mediawiki-password</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
this-is-an-initial-password-for-mediawiki | |||
</syntaxhighlight> | |||
: <syntaxhighlight lang="bash">$EDITOR /etc/nixos/configuration.nix</syntaxhighlight> | |||
<syntaxhighlight lang="nix"> | |||
{ config, pkgs, ... }: | |||
{ | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="nix"></syntaxhighlight> | |||
<syntaxhighlight lang="nix"> | |||
services.mediawiki.enable = true; | |||
services.mediawiki.virtualHost.hostName = "mediawiki.example.org"; | |||
services.mediawiki.virtualHost.adminAddr = "admin@example.org"; | |||
services.mediawiki.passwordFile = "/run/keys/mediawiki-password"; | |||
networking.firewall.allowedTCPPorts = [ 80 ]; | |||
} | |||
</syntaxhighlight> | |||
: <syntaxhighlight lang="bash">nixos-rebuild switch</syntaxhighlight> | |||
fails | |||
---- | |||
: <syntaxhighlight lang="bash">cp --preserve=all /var/lib/mediawiki/secret.key /var/lib/mediawiki/passwordFile</syntaxhighlight> | |||
: <syntaxhighlight lang="bash">cat /run/keys/mediawiki-password > /var/lib/mediawiki/passwordFile</syntaxhighlight> | |||
: <syntaxhighlight lang="bash">$EDITOR /etc/nixos/configuration.nix</syntaxhighlight> | |||
<syntaxhighlight lang="nix"></syntaxhighlight> | |||
<syntaxhighlight lang="nix"> | |||
# services.mediawiki.passwordFile = "/run/keys/mediawiki-password"; | |||
# services.mediawiki.passwordFile = "/tmp/configuration.nix_services_mediawiki_passwordFile"; | |||
services.mediawiki.passwordFile = "/var/lib/mediawiki/passwordFile"; | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="nix"></syntaxhighlight> | |||
: <syntaxhighlight lang="bash">nixos-rebuild switch</syntaxhighlight> | |||
works |
Latest revision as of 10:11, 31 March 2022
Now that there is `services.mediawiki` i think this article needs to be revised. I am somewhat struggling to get the whole setup running, there are just so many configuration options and it is not clear what actually needs to be done I was looking for a nixos container setup which gets requests forwarded from the host system but maybe it is enough to have mediawiki listen on the a port != 80 --Makefu (talk) 07:28, 26 May 2021 (UTC)
configuration examples
minimal configuration
- tested on NixOS 21.11
- with a working setup for networking
touch /run/keys/mediawiki-password
$EDITOR /run/keys/mediawiki-password
cat /run/keys/mediawiki-password
this-is-an-initial-password-for-mediawiki
$EDITOR /etc/nixos/configuration.nix
{ config, pkgs, ... }:
{
services.mediawiki.enable = true;
services.mediawiki.virtualHost.hostName = "mediawiki.example.org";
services.mediawiki.virtualHost.adminAddr = "admin@example.org";
services.mediawiki.passwordFile = "/run/keys/mediawiki-password";
networking.firewall.allowedTCPPorts = [ 80 ];
}
nixos-rebuild switch
fails
cp --preserve=all /var/lib/mediawiki/secret.key /var/lib/mediawiki/passwordFile
cat /run/keys/mediawiki-password > /var/lib/mediawiki/passwordFile
$EDITOR /etc/nixos/configuration.nix
# services.mediawiki.passwordFile = "/run/keys/mediawiki-password";
# services.mediawiki.passwordFile = "/tmp/configuration.nix_services_mediawiki_passwordFile";
services.mediawiki.passwordFile = "/var/lib/mediawiki/passwordFile";
nixos-rebuild switch
works