To prevent new user registrations add the following to LocalSettings.php

# This snippet prevents new registrations from anonymous users
# (Sysops can still create user accounts)
$wgGroupPermissions['*']['createaccount'] = false;

To prevent anonymous users reading pages add the following to LocalSettings.php

#Disable reading line, for anonymous (not-logged-in => * ) :
$wgGroupPermissions['*']['read'] = false;

# … and enable anonymous to read the followings pages :
$wgWhitelistRead = array( “Main Page”, “Special:Userlogin”, “-“, “MediaWiki:Monobook.css” );

# … same in an other language (French, with one UTF-8 special characteres) :
# $wgWhitelistRead = array( “Page Principale”, “Special:Userlogin”, utf8_encode(‘Aide en français’));