Manual:$wgWhitelistRead

Details
If a group of users is blocked from viewing the wiki by using the $wgGroupPermissions setting...

$wgGroupPermissions[...]['read'] = false;

...you may still want them to be able to view certain key pages, in particular the login page! This setting holds an array of page names that all users are allowed to view, regardless of their group permissions.

A recommended minimum is as follows:

$wgWhitelistRead = array("Main Page", "Special:Userlogin", "-", "MediaWiki:Monobook.css");

This allows everyone to view the home page and the login screen, plus it includes the javascript/css files for the default skin in order to avoid (probably silent) browser errors.

You may also want to include other pages such as help/about/contact pages.

Anonymous users can only view: Special:Userlogin
Anonymous users cannot read or edit any other page, but can still create accounts: $wgGroupPermissions['*']['read'] = false; $wgGroupPermissions['*']['edit'] = false; $wgWhitelistRead = array ("Special:Userlogin");

To additionally block account creation by anonymous users, add the following line: $wgGroupPermissions['*']['createaccount'] = false;

With anonymous account creation disabled sysops will need to create accounts for new users manually.