Markus Krötzsch <mak at aifb.uni-karlsruhe.de>
reported on the mw mailing list:
In addition, you can configure the wiki to let only your local user access any pages in any way, and then configure a (probably not very secure) auto-login for localhost
. At the end of your LocalSettings, try:
### User permissions: take all privileges from anonymous users $wgWhitelistRead = array( "Special:Userlogin", "-", "MediaWiki:Monobook.css" ); $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['read'] = false; # not secure but good enough :-) $wgHooks['AutoAuthenticate'][] = 'authenticateLocalUser'; function authenticateLocalUser($user) { global $wgServer; if ($wgServer == 'http://localhost') { $user = User::newFromName('yourusername'); } }
where you replace "yourusername
" with the actual user. Similar settings also work nicely if you still want to allow yourself or some others to access your wiki remotely, which is not possible when completely blocking the wiki with a firewall.
Last updated 2019-11-24 at 03:30:43
ported