Changes

Jump to navigation Jump to search
Line 2: Line 2:  
[[Category:Software]]
 
[[Category:Software]]
 
{{ Note|'''This document is a work in progress and should be considered a draft until this message disappears.''' }}
 
{{ Note|'''This document is a work in progress and should be considered a draft until this message disappears.''' }}
= Docker MediaWiki Server =
   
Notes and configuration files for setting up MediaWiki in a dockerized environment.
 
Notes and configuration files for setting up MediaWiki in a dockerized environment.
   Line 440: Line 439:  
* Run '''''docker-compose up -d'''''
 
* Run '''''docker-compose up -d'''''
 
* Wait a minute then navigate to your wiki with https://<hostname/IP> for Intranet or https://<FQDN> for Internet.
 
* Wait a minute then navigate to your wiki with https://<hostname/IP> for Intranet or https://<FQDN> for Internet.
 +
 +
===Private IPs===
 +
Mediawiki will only use the IP presented by the NGINX Proxy server (which will not be the client's real IP).  To have Mediawiki trust the X-Forwarded-For (and record them), add the following to the LocalSettings.php file:
 +
<syntaxhighlight lang="php">
 +
# Use X-ForwardedFor instead for Real IP
 +
$wgUseCdn = true;
 +
$wgCdnServersNoPurge = [];
 +
$wgCdnServersNoPurge[] = "172.18.0.0/24";
 +
</syntaxhighlight>
 +
Change the '''172.18.0.0/24''' to the subnet your container is using for talking to the NGINX Proxy.
 +
 +
Reference: https://www.mediawiki.org/wiki/Manual:$wgUsePrivateIPs
    
=Misc=
 
=Misc=

Navigation menu